11271

How to set the response of a form post action to a iframe source?

I have a form and an iframe. I want to set the source of the iframe on form submit to a 3rd party payment gateway url. Also, onSubmit a javascript function is called. I want to display the response of the form submit within a iframe rather than in the parent window. Kindly guide me. Thanks.

Answer1:

<form target="frame" onsubmit="document.getElementById('frame').style.display = 'block';"> </form> <iframe id="frame" name="frame" style="display: none;"></iframe>

I think that's all you need ;)

Recommend

  • How to empty the dropzone modal after submitted in ReactJS?
  • Help required on onbeforeunload or click on browser back button
  • Payum Bundle : How to change the view of capture action in symfony2
  • How to submit the form from parent component?
  • Connecting Couchbase sync adapter to couchdb server
  • How to integrate CCAvenue to Ionic app?
  • ngFor youtube links with Domsanitizer in Angular2
  • Javascript - Waiting for event before proceeding
  • Unique SMS sender id?
  • Javascript Array, Object, Date not defined
  • Is there a way to dynamically embed PDF Files in a JSP pulled from the file system?
  • Detect when Facebook like button is clicked
  • jQuery ready not fired after rails link_to is clicked
  • Google Custom Search with transparent background
  • HTML download movie download link
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • Submit form in a displaytag pagination
  • Updating server-side rendering client-side
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • ActionScript 2 vs ActionScript 3 performance
  • How to make Safari send if-modified-since header?
  • Adding custom controls to a full screen movie
  • To display the title for the current loaction in map in iphone
  • jQuery tmpl and DataLink beta
  • Why winpcap requires both .lib and .dll to run?
  • Circular dependency while pushing http interceptor
  • Traverse Array and Display in markup
  • SQL merge duplicate rows and join values that are different
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • Change div Background jquery
  • Qt: Run a script BEFORE make
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • unknown Exception android
  • reshape alternating columns in less time and using less memory
  • Binding checkboxes to object values in AngularJs
  • Net Present Value in Excel for Grouped Recurring CF
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How to load view controller without button in storyboard?