in reply to Post from jQuery to Perl - can't access parameters
I suspect nothing is happening because your Perl script isn't getting called when you attempt this with jQuery. Your jQuery to deal with the submit actually isn't doing what you think it is. You need to explicity stop it from continuing as a normal form submission using preventDefault(). A full example can be found in the documentation for the post method http://api.jquery.com/jQuery.post/.
If you're using Firebug you can aid basic debugging by writing things out to the console via console.log('Something went wrong here/meaningful error message');, and making logging/errors persistant. I suspect you're just reloading the form. Further you may be interested in Using Perl, jQuery, and JSON for Web development from the tutorials section.
Update: this advice is spot on regards the printing of headers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Post from jQuery to Perl - can't access parameters
by stuckdev (Initiate) on Mar 13, 2013 at 15:09 UTC | |
by tobyink (Canon) on Mar 13, 2013 at 15:19 UTC | |
by stuckdev (Initiate) on Mar 13, 2013 at 15:43 UTC |