Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery - how to open a window and POST to it? (required for bank processing page - doesn't accept querystring)

Is there anyway that i can open a new window in the browser using jquery and post to it.

Reason being is my bank requires that i open there payment gateway and pass my values by POST and not GET.

I have a bit of workaround at the moment but its not idea.. I used QUERYSTRING to an ASPX page withing some hidden forms and submit the form to my bank

but its really not good.

Maybe jquery can do this natively or using a plugin?

like image 635
mark smith Avatar asked Jul 06 '09 12:07

mark smith


1 Answers

Stackoverflow Archive:

  • Javascript Post on Form Submit Open New Window

    Accepted Answer:
    Add <form target="_blank" ...></form>
    or form.setAttribute("target", "_blank");
    to your form's definition.

Google Results:

  • "Javascript Post to New Window"
like image 131
Sampson Avatar answered Oct 23 '22 13:10

Sampson