Sending a form data as GET |
[eluser]aryan_[/eluser]
I have a form containing 5 buttons. I want clicking on any button should send it's value in uri. So if I have 5 buttons <input type="button" name="b1" value="1" /> <input type="button" name="b2" value="2" /> <input type="button" name="b3" value="3" /> <input type="button" name="b4" value="4" /> <input type="button" name="b5" value="5" /> Clicking on any button should send its value via GET string like http://example.com/class/function/2 2 is the value of button b2. How to? Thanks much!
[eluser]Bramme[/eluser]
You could do it with some javascript (I only know jquery though, so here goes) Code: $(function() { remove the space between window. and location, the parser removes it.
[eluser]Bramme[/eluser]
put all the buttons in a seperate form, make them type="submit" and set the action of the form to the correct link? |
Welcome Guest, Not a member yet? Register Sign In |