Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Accessing iframe from within frame ???

Reply
Thread Tools

Accessing iframe from within frame ???

 
 
nets
Guest
Posts: n/a
 
      12-31-2004
I have this (sorry if you not using fixed spacing font

|----------|---------------------|
| Frame_1 | Frame_2 |
| | |----------------| |
| | | IFrame_1 | |
| | |----------------| |
| | |
| | <a onClick=... |
|----------|---------------------|

I.e. my application has been embedded in a frameset at from a third
party.

I'm using an iframe - here "IFrame_1" that I'm reloading then a user
clicks an <a> link - code looks like this:

<a href='#' onClick="parent.Iframe_1.location='test.html';">.. .</a>

This works fine when my page is not embedded in a frameset. However,
when it is, I am getting a JavaScript run time error:

Error: parent.IFrame_1 is null or not an object
Anyone has a hint?
Thanks!
-nets

 
Reply With Quote
 
 
 
 
Richard Cornford
Guest
Posts: n/a
 
      12-31-2004
nets wrote:
<snip>
> <a href='#' onClick="parent.Iframe_1.location='test.html';">
>...</a>
>
> This works fine when my page is not embedded in a frameset.
> However, when it is, I am getting a JavaScript run time error:
>
> Error: parent.IFrame_1 is null or not an object
> Anyone has a hint?


Leave the javascript alone until you comprehend at least the basics of
HTML. Use:-

<a href="test.html" target="IFrame_1">...</a>

- and double up "IFrame_1" as both the name and ID of the IFRAME.

Richard.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
target form field in iframe w/in frame from other frame starman7@hotmail.com Javascript 2 05-27-2005 10:25 AM
controlling an iframe from another iframe within a frame James Wallace Javascript 1 05-14-2004 05:18 PM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM
Reloading a iframe from within that same iframe Gustavo Javascript 0 08-25-2003 02:45 PM
After the execution of frame.iframe.document.designMode="On" , I lost the access to iframe, it says permission denied bhaskarna@yahoo.com Javascript 0 07-17-2003 05:05 AM



Advertisments