[/code] I can go either a.php?myText=hello or b.php?myText=hello with the code above.
The code below doesn’t work correctly, but it will show what I want.
[code]
[/code]want-to-be result
If I click the button “a_submit”, it will go to c.php?a=1&myText=hello or c.php?myText=hello&a=1
If I click the button “b_submit”, it will go to c.php?b=1&myText=hello or c.php?myText=hello&b=1
How can I make the above possible (two submit buttons with each parameter in GET value)?
Since you are using JavaScript anyway (even though you have it jumbled with the HTML instead of keeping it separate) you can use hidden fields for the second value. Simply set up hidden fields named ‘a’ and ‘b’ and set their values to “” to start with then set the one you want to pass the 1 to a value of 1 in the JavaScript before submitting the form.
[/code]The code above is the best so far in my ability.
I am afraid to say the bellow
Would you show me the javascript code which can be updated easily instead of my jumbled one?