I have been trying to do this for hours now but no luck.

I have an application page in which there is a form. When user clicks Submit button, form values are submitted to an external site where user enters his credit card number etc. and complete transaction.

I am trying to submit this form with POST to that external site but it is not working.

If I make this form runat=server then I get error because SharePoint automatically adds its own form in page so now we have two server side forms.

I tried using Javascript submit methods like this.form.submit(), window.document.myform.submit(), document.getElementById("myform").submit() and document.getElementById["myform"].submit() but I get javascript error that this method "submit" is not available.

I have seen countless examples on internet and they all seem to create a form at run time and submit it using client side method for e.g. this.form.submit() which doesn't work in my case.

Is there any way to do this?

  • I fixed it by creating a new page in the middle. I pass values to this page and then this page submits the form. Since this new page is not part of master page, hence I can use my own form and submit it to external site. – Frank Martin Sep 12 '15 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.