PHP: Xhtml confusion using javascript commands with onchange?

  • Thread starter Thread starter raisin_smiles
  • Start date Start date
R

raisin_smiles

Guest
I had asked a few previous questions about the selection box and options to reload pages etc..,.

I understand when using javascript within xhtml to use <script> tags.

However in my php file I can used the command:-
<select ... onchange='window.location.reload()' >

With the command "window.location.reload()" is javascript however
"window.form.submit" where a submit button is present errors due to not understanding what a window.form element is.

This has confused me, why cant I simulate the action of pressing the submit button within the onchange?

Thanks
Its the command "window.form.submit()" Im having issues with.
 
Back
Top