PDA

View Full Version : onClick variables between windows/iframes



markkanning
Mar 8th, 2007, 07:08 PM
Hey all,
I have a clickable div on a page inside and iframe that I need to send a string variable to a form text field on the parent document. I've already tried several iterations of onclick="parent.document.location.form.input...etc." to no avail. Is there a piece of the puzzle I'm missing?

Also, is there a way to accomplish this same idea but by sending the variable from a popup window to the parent window?

mark

glenngv
Mar 8th, 2007, 07:10 PM
from iframe to parent:

parent.document.formName.fieldName.value="whatever";
from popup to parent:

opener.document.formName.fieldName.value="whatever";

markkanning
Mar 8th, 2007, 07:24 PM
Thanks, Glenn. It works fine.

P.S. It wasn't helping, however, that the iframe in question was calling THE WRONG DAMN PAGE!!!!!!!

mark