0

I'm calling an ashx handler with jquery ajax:

$.ajax({ type: "GET",
    url: "handlers/getpage.ashx?page=" + pageName,
    dataType: "html",
    success: function (response) {
               $('.hidden-slide-panel').append(response);
});

However when this hidden-slide-panel div gets populated, when I click on anything inside it, the form action value has been set now to getpage.ashx, rather than the calling pages form action. Is there a way to force it to use the calling pages action?

4

2 に答える 2

0

form変更された場合は、元の値に戻す必要があるようです。

document.forms[0].action = 'whatever';
// or
document.YourFormNameHere.action = 'whatever';
于 2012-09-18T16:45:29.310 に答える
0

ajax() の "data" プロパティを使用します。

http://api.jquery.com/jQuery.ajax/

例:

$.ajax({ type: "GET",
         url: "whatever.ashx",
         data: { page: pageName },
         success: function(data) { alert(data); }
});
于 2012-09-18T16:38:10.863 に答える