[SOLVED] javascript browser chrome

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

[SOLVED] javascript browser chrome

Post by woipi90 » Sat Jan 07, 2012 1:45 am

hy guys,

ive got a problem with a function i wanna use in my mod.. its working but not for chrome.. now i wanted to ask if anyone knows how i can fix this for chrome.. or tell me wher ethe bug is... ;)

i have this script:

Code: Select all

function tgl(divid)
{
	
	if ($('#' + divid).is(":hidden")) {
        $('#' + divid).slideDown("slow");
    } else {
        $('#' + divid).slideUp("slow");
    }
}

function hide(divid)
{
	$('#' + divid).slideUp("slow");
}

afterwards in my template:

Code: Select all

		<dl>
			<dt><label for="join_option">{L_JOIN_OPTION}:</label><br /><span>{L_JOIN_OPTION_EXPLAIN}</span></dt>
			<dd id="join_option">
			<select name="join_option" class="liteoption" id="selectbox">
			<option value="0"<!-- IF JOIN_VIEW == "0" --> selected="selected"<!-- ENDIF -->>{L_BC_NONE}</option>
			<option value="1"<!-- IF JOIN_VIEW == "1" --> selected="selected"<!-- ENDIF -->>{L_ACCEPTION_LIST}</option>
			<!-- IF PASSWORD_ENABLE -->
			<option value="2"<!-- IF JOIN_VIEW == "2" --> selected="selected"<!-- ENDIF -->>{L_PASSWORD}</option>
			<!-- ENDIF -->
			</select>
			</dd>
		</dl>
		<script type="text/javascript">
		//<![CDATA[
                <!--
                        var selectmenu=document.getElementById("selectbox");
                        selectmenu.onchange=function(){
                                var chosenoption=this.options[this.selectedIndex];
                                if (chosenoption.value=="2"){
                                        tgl('password-div');
                                }
                                else
                                {
                                        hide('password-div');
                                }
                        }
                //-->
		//]]>
		</script>
		<div id="password-div" class="bc-password">
			<dl>
				<dt><label for="password">{L_PASSWORD}:</label><br /><span>{L_CLUB_PASSWORD_EXPLAIN}</span></dt>
				<dd><input type="password" tabindex="2" name="password" id="password" size="25" maxlength="100" class="inputbox autowidth" /></dd>
			</dl>
			<dl>
				<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
				<dd><input type="password" tabindex="3" name="password_confirm" id="password_confirm" size="25" maxlength="100" class="inputbox autowidth" /></dd>
			</dl>
		</div>
maybe somebody can help me with this...


thx woipi
Last edited by woipi90 on Mon Jan 09, 2012 7:10 am, edited 1 time in total.
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: javascript browser chrome

Post by woipi90 » Sun Jan 08, 2012 12:29 pm

is there anyone who can help me?
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
doktornotor
Registered User
Posts: 608
Joined: Fri Sep 09, 2011 7:41 am

Re: javascript browser chrome

Post by doktornotor » Sun Jan 08, 2012 3:25 pm

Do not really see how is some JS code being broken in Chrome related to phpBB. You will be better off asking somewhere else.
Support requests via PM go straight to /dev/null!

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: javascript browser chrome

Post by woipi90 » Sun Jan 08, 2012 4:23 pm

doktornotor wrote:Do not really see how is some JS code being broken in Chrome related to phpBB. You will be better off asking somewhere else.
kk thx just wanted to ask if somebody has an idea... ;)
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: javascript browser chrome

Post by 4_seven » Sun Jan 08, 2012 4:25 pm

may you have testuser, to watch that script live, so someone can help.
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: javascript browser chrome

Post by woipi90 » Sun Jan 08, 2012 5:08 pm

4_seven wrote:may you have testuser, to watch that script live, so someone can help.
ye u can see it on my testboard here:
http://intube.kilu.de/root/clubs.php?mode_clubs=create

the script u can see where the select box is... ;)

testacc:
testuser
testtest


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: javascript browser chrome

Post by 4_seven » Sun Jan 08, 2012 5:42 pm

Hm, for me it works with chrome (latest version). What exactly don't work for you?
Bcs. if i choose Join Option > [Password] in chrome the password field under checkbox appears .
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: javascript browser chrome

Post by woipi90 » Sun Jan 08, 2012 7:25 pm

4_seven wrote:Hm, for me it works with chrome (latest version). What exactly don't work for you?
Bcs. if i choose Join Option > [Password] in chrome the password field under checkbox appears .
yeah its a patch i made for chrome...

the problem is there should appear a second password_field in chrome when u select passwordprotection if it would work... :(

now it appears cause i added this:

Code: Select all

if ($.browser.chrome)
			{
				$('.chrome').append("<dl><dt><label for='password'>{L_PASSWORD}:<\/label><br /><span>{L_CLUB_PASSWORD_EXPLAIN}<\/span><\/dt><dd><input type='password' tabindex='2' name='password' id='password' size='25' maxlength='100' class='inputbox autowidth' /><\/dd><\/dl><dl><dt><label for='password_confirm'>{L_CONFIRM_PASSWORD}:<\/label><\/dt><dd><input type='password' tabindex='3' name='password_confirm' id='password_confirm' size='25' maxlength='100' class='inputbox autowidth' /><\/dd><\/dl>");
			}

grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [SOLVED] javascript browser chrome

Post by woipi90 » Mon Jan 09, 2012 7:10 am

bug solved..
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: javascript browser chrome

Post by AmigoJack » Mon Jan 09, 2012 7:25 am

woipi90 wrote:

Code: Select all

<dl><dt><label for='password'>{L_PASSWORD}:<\/label><br /><span>{L_CLUB_PASSWORD_EXPLAIN}<\/span><\/dt><dd><input type='password' tabindex='2' name='password' id='password' size='25' maxlength='100' class='inputbox autowidth' /><\/dd><\/dl><dl><dt><label for='password_confirm'>{L_CONFIRM_PASSWORD}:<\/label><\/dt><dd><input type='password' tabindex='3' name='password_confirm' id='password_confirm' size='25' maxlength='100' class='inputbox autowidth' /><\/dd><\/dl>
Try using valid HTML by either using <dl> or </dt> instead.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

Locked

Return to “[3.0.x] MOD Writers Discussion”