4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: martrix on March 11, 2005, 11:34:44 PM
-
Author of modification: V@no
Always when a checkbox appears on the internet I tend to click on the description text next to the checkbox... but it doesn't change the state of the CBox
This tiny mod allows the user to change the „auto_login“-checkbox state by clicking the text next to it… and not only by clicking the "small" CheckBox itself.
open {your_template}/user_loginform.html
find:
<td><span class="smalltext">{lang_auto_login}</span></td>
change to:
<td><span class="smalltext" onClick="if(auto_login.checked) auto_login.checked=false; else auto_login.checked=true;" style="cursor:default;">{lang_auto_login}</span></td>
-
Hey Guys,
Thanks for this - was just what i was looking for :D One thing i added though, was style="cursor: pointer"
, just so users can see that they can click on the text.. Otherwise it is perfect!!!
Cheers
Chris
-
hi martrix,
also ... thanks for this nice tiny mod ... :D
@supastoked ... correct : style="cursor: pointer" ... :!:
mawenzi
-
it should be autologin instead of auto_login.
At least on my site
-
it should be autologin instead of auto_login.
At least on my site
Not in fresh 4images installation...
-
hmm... maybe it's the phpbb mod :)
You know if it could work under firefox?
-
with netscape there is no problem, so i think its works in Firefox too...
-
Not quete
take a look on Vano's homepage.
http://gallery.vano.org/en/13932
with netscape there is no problem, so i think its works in Firefox too...
-
and then?
-
Can you mark the remember by clicking the text with FF?
-
i have it also on my site and with Netscape it works...
-
You are right, this method doesnt work on FF...
The work around I found so far is add id="auto_login" into the checkbox
and then use "cross-browser ID read" script.
So, the final code is:
<script language="javascript">
function get_id(id)
{
if (document.getElementById) return document.getElementById(id);
if (document.all && !document.getElementById) return document.all[id];
if (document.layers) return document.layers[id];
}
</script>
<input type="checkbox" name="auto_login" id="auto_login" value="1" checked/> <span class="smalltext" onClick="alcb=get_id('auto_login');if(alcb.checked) alcb.checked=false; else alcb.checked=true;" style="cursor:default;">{lang_auto_login}</span>
(if you already have get_id() JS function, then you should not use mine.)
-
Great V@no.
Bart sends v@no a big hug :mrgreen: