in reply to Perl AJAX jQuery, js file
If I remember jQuery correctly, you can extract the target element from the HTML, like the second response on Stackoverflow shows:
$('#submitform').click(function() { $.ajax({ url: "getinfo.asp", data: { txtsearch: $('#appendedInputButton').val() }, type: "GET", dataType : "html", success: function (data){ $('#showresults').html($('#showresults',data).html()); // similar to $(data).find('#showresults') }, });
For passing in the parameters, either pass them as the data key, or construct an URL-encoded query string and pass that to your call.
Mojolicious may have "too much" for your current taste, but it brings a lot of convenient things to the plate.
|
|---|