473,807 Members | 2,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can someone please point the way? IFRAME troubles

Hi, this is my present configuration

<FRAMESET ID="MAIN_BODY" FRAMESPACING="0 " ROWS="100%,*"
FRAMEBORDER="0" >
<FRAME NAME="frameA" SRC="./contentA.htm">
<FRAME NAME="frameB" SRC="./contentB.htm">
</FRAMESET>
'contentA.htm' has a <IFRAMEinside of it, with the ID/NAME of
"internal"

So, what I want to do, is from this IFRAME named 'internal', call a
Javascript function sitting in the contentB.htm file.

I've tried: top.frameB.func tionname() but get "frameB" is null or not
an object.

Any help would be really awesome. Thank you!

Alexia

Jul 23 '06 #1
4 1299

al****@gmail.co m wrote:
<FRAMESET ID="MAIN_BODY" FRAMESPACING="0 " ROWS="100%,*">
<FRAME NAME="frameA" SRC="./contentA.htm">
<FRAME NAME="frameB" SRC="./contentB.htm">
</FRAMESET>

'contentA.htm' has a <IFRAMEinside of it [...]
So, what I want to do, is from this IFRAME named 'internal', call a
Javascript function sitting in the contentB.htm file.

I've tried: top.frameB.func tionname() but get "frameB" is null or not
an object.
We have a corporate application that does this all the time. Using
either "top." or "parent.parent. " should work fine.

One reason it wouldn't work is if one of the frames actually comes from
a different website. Then security will prevent you from accessing the
other frame.

Cheers, Kev

Jul 23 '06 #2

Kevin Darling wrote:
al****@gmail.co m wrote:
<FRAMESET ID="MAIN_BODY" FRAMESPACING="0 " ROWS="100%,*">
<FRAME NAME="frameA" SRC="./contentA.htm">
<FRAME NAME="frameB" SRC="./contentB.htm">
</FRAMESET>

'contentA.htm' has a <IFRAMEinside of it [...]
So, what I want to do, is from this IFRAME named 'internal', call a
Javascript function sitting in the contentB.htm file.

I've tried: top.frameB.func tionname() but get "frameB" is null or not
an object.

We have a corporate application that does this all the time. Using
either "top." or "parent.parent. " should work fine.

One reason it wouldn't work is if one of the frames actually comes from
a different website. Then security will prevent you from accessing the
other frame.

Cheers, Kev
Hi Kev! This is on the same domain, so no security issues. But, I
tried both of those top.top.frameB. functionname() and
parent.parent.f rameB.functionn ame() but it doesn't work (still get the
'null or not an object error') Do you think it be something else?
Thank you so much for looking at this -- this is trying me bonkers!!

Jul 23 '06 #3
en*********@gma il.com wrote:
>><FRAMESET ID="MAIN_BODY" FRAMESPACING="0 " ROWS="100%,*">
<FRAME NAME="frameA" SRC="./contentA.htm">
<FRAME NAME="frameB" SRC="./contentB.htm">
</FRAMESET>

'contentA.htm ' has a <IFRAMEinside of it [...]
So, what I want to do, is from this IFRAME named 'internal', call a
Javascript function sitting in the contentB.htm file.

I've tried: top.frameB.func tionname() but get "frameB" is null or not
an object.
We have a corporate application that does this all the time. Using
either "top." or "parent.parent. " should work fine.

One reason it wouldn't work is if one of the frames actually comes from
a different website. Then security will prevent you from accessing the
other frame.

Cheers, Kev

Hi Kev! This is on the same domain, so no security issues. But, I
tried both of those top.top.frameB. functionname() and
parent.parent.f rameB.functionn ame() but it doesn't work (still get the
'null or not an object error') Do you think it be something else?
Thank you so much for looking at this -- this is trying me bonkers!!
Don't know if it's the solution, but try top.frameB.docu ment.functionna me()

HTH, jojo
Jul 23 '06 #4
en*********@gma il.com wrote:
Hi Kev! This is on the same domain, so no security issues. But, I
tried both of those top.top.frameB. functionname() and
parent.parent.f rameB.functionn ame() but it doesn't work (still get the
'null or not an object error')
Time to start debugging :-)

Put this line somewhere in your "internal" IFRAME page:

alert(parent.na me);

It should say "frameA". If it fails or gives the iframe name
"internal", then IE thinks whatever's in the IFRAME has no permission
to break out of its box... in which case, IE limits parent and top to
the IFRAME itself.

Oh, and is it _exactly_ the same domain? Otherwise search the news
group for "cross domain scripting" help.

Etc. Kev

Jul 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1540
by: Tom Szabo | last post by:
I have been learning and practicing JS for a few weeks now. I have a good understanding of most things and came up with a few complex modules. Basically I am almost comlpleted my library code that is needed for some development soon. Unfortunately I am having a real confusion with IFrames. In order to achieve some of my goals I have arrived to the conclusion that IFrames will suit the best. Well, in theory they would. In practice I...
1
928
by: Andrew | last post by:
Hello, friends, We have PDF files need to be displayed in web pages. My customer prefer both PDF viewer and our own web page contents in the same IE window, rather than 2 IE windows (one to show PDF and one to show our own web contents). Can we do this? Any sample source code or reference papers? Thanks a lot. (I know how to make PDF viewer full of an IE window without other elements)
1
9667
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
21
6161
by: javainfo | last post by:
How can i refresh IFRAME and load data through AJAX?
3
4496
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
1
1283
by: gkellymail | last post by:
I have a small javascript/html code below that demonstrates that problem I'm having in a larger program. I've tried all kinds of things to get it to work, but it just won't do what I want. I've tried setTimeout, setInterval. In this dumb, but valid example, i want to display an iframe that loads google. Before it loads I want to display a 'processing' indicator in green in the middle of the window. Then, when it is done, it is to turn...
1
2233
PepsiHack
by: PepsiHack | last post by:
Ok i am developing a site on a server that only allows HTML and some Java Script - The Server displays my pages in its own layout. I tried to set up hosting somewhere else, however the organization has to host on this server.At first i couldnt even use CSS to style the page. However up to this point I have used javascript to impliment CSS and an external server to host scripts and images and css on. Heres the problem: there is a chat room...
2
2649
by: mvmashraf | last post by:
How can I make an IFRAME resize itself when someone changes their resolution? I have a table in that i am loading that iframe, I did give the width of Iframe and the width of table as 100%, What shall i need to solve the problem... ANy help would be appreciated.. By @sharf
9
8854
by: Lee | last post by:
Hi all, We need to create a page where we detect the finish of a game that's hosted on another site. We thought of doing it with frames, where we would put the game in an iframe that is contained in our page. All we need to do is to READ the location.href of that iframe (which is again, from anohter domain, not our domain) - but we can't! According to this MSDN article, http://msdn.microsoft.com/en-us/library/ms533028(VS.85).aspx...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9195
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.