durangod
11-26-2012, 05:28 AM
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)" />
the issue is that i am now changing that to a auto generated value so i had to change it to readonly and in doing so now my onchange wont work because im not inputing the value so it does not see the change.
<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
Question is what can i use to execute the toggle_handle now. What are my option, i obviously cant use onchange, and onfocus and onblur is out im sure because it is readonly. I tried onload just to test but that dont work lol
Any suggestions in order to excute that right after its loaded
thanks
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.
<input type="text" name="handle" id="handle" size="20" value="<?=$_SESSION['post']['txtHandle'];?>" tabindex='1' onchange="toggle_handle(this.value)" />
the issue is that i am now changing that to a auto generated value so i had to change it to readonly and in doing so now my onchange wont work because im not inputing the value so it does not see the change.
<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
Question is what can i use to execute the toggle_handle now. What are my option, i obviously cant use onchange, and onfocus and onblur is out im sure because it is readonly. I tried onload just to test but that dont work lol
Any suggestions in order to excute that right after its loaded
thanks
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.