Skip to content Skip to sidebar Skip to footer

Url Parameters Not Getting Passed During Javascript Submit

I am trying to do a form submit from javascript. The form gets submitted but the parameters are not getting passed. Below is my code.

Solution 1:

When the form gets submited through 'get', the browser takes the values of the form, makes a query string out of it and then sends the window to that location. If there was already a query string there, it doesn't just append the new values.. it wipes them out. If you change the method to a 'post', you'll notice that it does in fact add that data you wanted to have added to the URL. Since I'm not sure what exactly your end result really is, I at least hope this information helps you out. It's just based off experience, so others might have more technical insights.


Post a Comment for "Url Parameters Not Getting Passed During Javascript Submit"