I have an input field on my PHP page. When a value is entered into the input box a javascript is called and mysql values returned next to the input box. This works 100% without errors.
My code for this is:
<input type=text id=sku1 name=sku1 onchange="showUser(1, this.value)" onkeypress="return enter(document.orderform.sku2)" value=<? echo $sku1; ?> >
When the user submits the form, the page returns to itself as some calculations are performed. When the page reloads the input box has the value the user entered ($sku1). my problem is that the mysql values are no longer next to the input box as the input box hasnt changed since reloading.
I want to use something like the javaascript OnLoad functionality.
<input type=text id=sku1 name=sku1 onchange="showUser(1, this.value)" OnLoad="showUser(1, this.value)" onkeypress="return enter(document.orderform.sku2)" value=<? echo $sku1; ?> >
This however does not work.
Any ideas as how to get the javascript to execute on load as well as when the user changes the value of the input box?
Thanks and Regards, Ryan Smith