Skip to content Skip to sidebar Skip to footer

Submitting Form Using Javascript When Javascript Is Disabled

Below is the code which I am using to post form in ASP.NET to another page..... It works fine as long as javascript is enabled, but stops on disabling javascript. StringBuilder sb

Solution 1:

Well, you're using javascript to post a form

onload='document.forms[""form""].submit()'

so when javascript is disabled your code won't execute. It's all working (or not working) as expected.

Solution 2:

THe reason why it doesn't work is because you are using JavaScript to submit the form.

"onload='document.forms[""form""].submit()'"

The code above is javascript.

You can alternatively add a submit button saying "Click to continue" for those users that don't have JavaScript enabled, but keep the OnLoad for users that have JavaScript enabled.

Post a Comment for "Submitting Form Using Javascript When Javascript Is Disabled"