Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: instead of onchange
11-26-2012, 06:28 AM #1
instead of onchange
I have an input like this
<input type="text" name="handle" id="handle" size="20" value="<?=$_SESSION['post']['txtHandle'];?>" tabindex='1' onchange="toggle_handle(this.value)" />
<input type="text" readonly="readonly" name="handle" id="handle" size="20" value="<?=$_SESSION['post']['txtHandle'];?>" tabindex='1' onchange="toggle_handle(this.value)" /> //need to execute it here or in the input if i can
Any suggestions in order to excute that right after its loaded
UPDATE i did get the onclick to work but you have to click on it, but thats ok its better than nothing. if i just put the call to the function it wont execute until the form is done and thats not what i want. I wish there was a way to just let it execute in exactly the same manner as the onchange but allow it to sense the onchange automatically.
Last edited by durangod; 11-26-2012 at 02:57 PM.
11-26-2012, 07:19 AM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 666 Times in 655 Posts
Simply put the code at the bottom of the web page so it runs as toon as the HTML finishes loading
11-26-2012, 07:40 AM #3
Thanks i tried that but didnt work.
here is the bottom of my page its split into several sections this is the first process section for a multi form
11-26-2012, 02:57 PM #4
What i ended up doing is just not using the ajax listener for that event. I just hard coded the php and js in that section rather that use the ajax.