I have a simple HTML file with an iframe. Inside the iframe is a
simple submission form. I would like to be able to click "Submit" and
have Jquery append content to a div that is outside of the iframe.
I have exhausted my knowledge of parent heirarchy in JS trying to find
a solution. I couldn't find a solution in the Wiki or on Google.
I have a simple HTML file with an iframe. Inside the iframe is a simple submission form. I would like to be able to click "Submit" and have Jquery append content to a div that is outside of the iframe.
I have exhausted my knowledge of parent heirarchy in JS trying to find a solution. I couldn't find a solution in the Wiki or on Google.
> I have a simple HTML file with an iframe. Inside the iframe is a
> simple submission form. I would like to be able to click "Submit" and
> have Jquery append content to a div that is outside of the iframe.
> I have exhausted my knowledge of parent heirarchy in JS trying to find
> a solution. I couldn't find a solution in the Wiki or on Google.
I beat my head against this wall for quite some time.
Try this:
$("#myid", top.document);
the top.document tells the selector to target the myid element which
exists in the topmost document (your parent page). In order for this
to work, jquery must be loaded in the file which is viewed through the
iframe.
On Mar 6, 6:24 pm, ABecks <abe...@gmail.com> wrote:
> I have a simple HTML file with an iframe. Inside the iframe is a
> simple submission form. I would like to be able to click "Submit" and
> have Jquery append content to a div that is outside of the iframe.
> I have exhausted my knowledge of parent heirarchy in JS trying to find
> a solution. I couldn't find a solution in the Wiki or on Google.
> I beat my head against this wall for quite some time.
> Try this:
> $("#myid", top.document);
> the top.document tells the selector to target the myid element which
> exists in the topmost document (your parent page). In order for this
> to work, jquery must be loaded in the file which is viewed through the
> iframe.
> On Mar 6, 6:24 pm, ABecks <abe...@gmail.com> wrote:
> > Hello,
> > I have a simple HTML file with an iframe. Inside the iframe is a
> > simple submission form. I would like to be able to click "Submit" and
> > have Jquery append content to a div that is outside of the iframe.
> > I have exhausted my knowledge of parent heirarchy in JS trying to find
> > a solution. I couldn't find a solution in the Wiki or on Google.
> I beat my head against this wall for quite some time.
> Try this:
> $("#myid", top.document);
> the top.document tells the selector to target the myid element which
> exists in the topmost document (your parent page). In order for this
> to work, jquery must be loaded in the file which is viewed through the
> iframe.
> On Mar 6, 6:24 pm, ABecks <abe...@gmail.com> wrote:
> > Hello,
> > I have a simple HTML file with an iframe. Inside the iframe is a
> > simple submission form. I would like to be able to click "Submit" and
> > have Jquery append content to a div that is outside of the iframe.
> > I have exhausted my knowledge of parent heirarchy in JS trying to find
> > a solution. I couldn't find a solution in the Wiki or on Google.