Hello,
Just wondering if it's possible to write one onsubmit function for every form in my website. So that the function is called when a form is submitted. I don't want to add onsubmit in every form tagg.
I just want to display a message when a form is submitted. Something like 'data is submitted, please wait'.
So I would add to the page head something:
document.form.onSubmit = alert('please wait');
I just have one index.php that is called and that's including content from other pages. So you understand that I would only need to declare this function in the index-page and that it would call the function everytime a form is submitted.
(I hope I explained it clear)
visit my website at
Just wondering if it's possible to write one onsubmit function for every form in my website. So that the function is called when a form is submitted. I don't want to add onsubmit in every form tagg.
I just want to display a message when a form is submitted. Something like 'data is submitted, please wait'.
So I would add to the page head something:
document.form.onSubmit = alert('please wait');
I just have one index.php that is called and that's including content from other pages. So you understand that I would only need to declare this function in the index-page and that it would call the function everytime a form is submitted.
(I hope I explained it clear)
visit my website at