Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 09:53 pm EST
Geeklog Forums
javascript?
bdefore
Anonymous
why is it that when i try to put this within my login username input form (in lib_common.php):
infocus="if(this.value=='name:')this.value='';"
... it causes a parse error?
4
7
Quote
Anonymous
Anonymous
Don't know how readable this will be, but here's the code I'm using: (if you'd like to check your own, it's lines 1191-1196 of lib_common.php)
$retval .= COM_startBlock($LANG01[47])
. '<p align="right"><form action="' . $_CONF['site_url'] . '/users.php" method="post">' . LB
. '<input type="text" size="10" name="loginname" value="' . $LANG01[21] . '" infocus="' . if(this.value=="name:"this.value=""; . '">' . LB
. '<input type="password" size="9" name="passwd" value="asdfas"><br>' . LB
. "$LANG01[59] " . '<input type="submit" value="' . $LANG01[58] . '"></form></p>'
. COM_endBlock(COM_getBlockTemplate('user_block', 'footer'));
Of course, the troublemaking part is this:
infocus="' . if(this.value=="name:"this.value=""; . '">' . LB
that's my attempt to 'escape out' of the php. i assume i'm missing something though because this isn't working either.
8
5
Quote
Anonymous
Anonymous
yep \' did it
8
9
Quote
All times are EST. The time is now 09:53 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content