I want a function to take some values from a form as input and manipulate in the background . I tried but it goes to a url mydomain.com/gtype=selected value . I just want it to do something in the background and not change the url
I have a fiddle over here.
http://jsfiddle.net/4qppX/
You need to
return falsein youronclickhandler.An alternative is to make the button a non-submitting button by saying
type="button"I am not sure about the reasoning for this by the W3C states: