Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

complex frameset traget

Status
Not open for further replies.

irate

Programmer
Jan 29, 2001
92
0
0
GB
I have pop up window that needs to target the document it came from.

But, that document is in a frameset with in a frameset.

frameset 1 (index.html)
Code:
<frameset rows=&quot;12%,88%&quot; cols=&quot;100%&quot;>
 <frame src=&quot;top.html&quot;>
  <frameset rows=&quot;100%&quot; cols=&quot;15%,85%&quot;>
   <frame src=&quot;left.html&quot;>
   <frame src=&quot;content.html&quot; name=&quot;content&quot;>
  </frameset>
</frameset>
frameset 2 (content.html)
Code:
<frameset cols=&quot;50%,50%&quot;>
 <frame name=&quot;editor&quot; src=&quot;editor.html&quot;>
 <frame name=&quot;preview&quot; src=&quot;preview.html&quot;>
</frameset>
editor.html has a popup link
Code:
<input type=&quot;button&quot; value=&quot;select&quot; onclick=&quot;window.open('selector.html');&quot;>
selector.html needs to access editor.html
This link is what I need help with, it should change the value of a textbox on the editor page but I dont know how to access it via the dom, can you help?
Code:
<a href=&quot;javascript:document.all.textbox.value='changed';window.close();&quot; target=&quot;parent.content.edit&quot;>change textbox</a>

Thanks Dan.
 
Try this:

<a href=&quot;javascript:opener.document.formName.textbox.value='changed';window.close();&quot;>change textbox</a>


Another way would be to name the selector window, then use the target attribute:
<input type=&quot;button&quot; value=&quot;select&quot; onclick=&quot;window.open('selector.html','selector');&quot;>

<a href=&quot;javascript:document.formName.textbox.value='changed';window.close();&quot; target=&quot;selector&quot;>change textbox</a>

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life--};
 
thanks, the opener.blah.blah worked...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top