开发者

how do redirect values to other page without click event in html. Below code is fine IE. But Not in Mozila

I have implemented paypal in my web page. Process is 'given inputs are redirect to other page(2 nd page) which have to get that input and redirect to paypal page(third page). Here we submit data on first page. value pass to second page(in this page user interaction not allowed) after pass to third page.It wor开发者_如何学Pythonks fine in IE . But Not In Mozila.Send any Solution.

Code sample(second page):


<%string product = Request.QueryString["productName"].ToString();%> <% string amount = Request.QueryString["price"].ToString(); %> "> "> document.all.frmpaypal.submit();


Fine in IE, Not In Mozila


document.getElementById("frmpaypal").submit();


document.all is an IE-only non-standard extension. You can use:

document.getElementById("frmpaypal").submit();

Which will work on both browsers. Better yet, use something like jQuery:

$("#frmpaypal").submit();

(This simple example doesn't really show you the power of jQuery, but you'll love it once you find out everything it can do!)


document.all is non-standard. Add an ID and use document.getElementById.


Have you checked into the possibility of sending values via GET instead of POST in the FORM's action attribute?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜