3

I a developing a site where I am using grails as my backend and php as my frontend and datatypes returns as JSON and Jquery. The issue is when I submit my form to target an iframe its work fine and return true value but yes on submitting the from I generates the iframe using jquery

Now what I have to do is take value out of that iframe and used it in my parent webpage and also to reset the form after submitting and iframe loaded how can I achieve this and how can I use jquery events on this.

What event should I use to generate effects on my page after the data is posted successfully and hidden iframe loaded successfully.

franzlorenzon
  • 5,845
  • 6
  • 36
  • 58
Bipin Chandra Tripathi
  • 2,550
  • 4
  • 28
  • 45

1 Answers1

0

Searching around I found sound help on Stack Overflow, about how to access iFrame parent page using jQuery.

window.parent.document

jQuery is a library on top of JavaScript, not a complete replacement for it. You don't have to replace every last JavaScript expression with something involving $.

To find in the parent of the iFrame use:

$('#parentPrice', window.parent.document).html();

how to access iFrame parent page using jquery?

Community
  • 1
  • 1
Brandon Poole
  • 382
  • 2
  • 7