getJSON triggered from a button inside a form
Posted
by nav
on Stack Overflow
See other posts from Stack Overflow
or by nav
Published on 2010-05-05T13:12:52Z
Indexed on
2010/05/05
13:18 UTC
Read the original article
Hit count: 182
Hi,
I'm having trouble understanding why I have to place the button triggering the getJSON method outside of the form for the request to work.
If the button is placed within the form then the getJSON method returns no results.
The code bascially makes a XHR request on clicking the Submit button, based on the value selected. I have replicated the issue here: http://jsfiddle.net/z6caj/
Many Thanks,
© Stack Overflow or respective owner