Portal Home > Knowledgebase > Articles Database > need help with html form onsubmit action


need help with html form onsubmit action




Posted by mjfroggy, 09-15-2012, 12:01 PM
I have an html form which I am using javascript and radio dials to indicate where the form variables should be submitted. My issue is when a user clicks the submit button it brings the user to the correct page but non of the variables get posted to the page. I know it is an issue with the javascript onsubmit tag because when I use just a regular action tag in the form and hard code to a test page the variables get posted to the page fine. So how do I get form variables to be posted to a page when the form is using an onsubmit and not a regular action Here is my code And below is my html form now when a user fills out the above form and gets to the correct page the two text input boxes dont have their variables posted? Suggestions Thanks

Posted by mSuleman, 09-15-2012, 12:44 PM
Just try the following code on the page to which you are redirecting . This will print all your submitted fields.

Posted by bravoserve, 09-18-2012, 08:39 AM
Try changing the path to your php files to be relevant instead of using URL addresses.

Posted by Geekware, 10-08-2012, 04:40 PM
Have you thought about using Jquery?

Posted by alyak, 10-12-2012, 03:14 PM
I can say how it will work , change form.action not in onsubmit handler , but in onclick handler of radio buttons . user click radio , immediatelly change form.action.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
cPanel Skeleton (Views: 785)
my .cnf settings (Views: 798)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.