473,778 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling a function in an iframe

How do I call a function within an iframe from the container main document ?

Many thanks in advance,

Aaron
Mar 12 '07 #1
4 5323
Aaron Gray said the following on 3/12/2007 1:21 PM:
How do I call a function within an iframe from the container main document ?
iFrameRef.funct ionName();

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 12 '07 #2
"Randy Webb" <Hi************ @aol.comwrote in message
news:Bt******** ************@gi ganews.com...
Aaron Gray said the following on 3/12/2007 1:21 PM:
>How do I call a function within an iframe from the container main
document ?

iFrameRef.funct ionName();
I was using the "name" attribute rather than "id" on the IFrame !

Aaron
Mar 12 '07 #3
ASM
Aaron Gray a écrit :
"Randy Webb" <Hi************ @aol.comwrote in message
news:Bt******** ************@gi ganews.com...
>Aaron Gray said the following on 3/12/2007 1:21 PM:
>>How do I call a function within an iframe from the container main
document ?
iFrameRef.func tionName();

I was using the "name" attribute rather than "id" on the IFrame !
iFrameref = parent.myIframe Name;

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Mar 12 '07 #4
On Mon, 12 Mar 2007 19:34:42 +0100, Aaron Gray <an********@gma il.com
wrote:
"Randy Webb" <Hi************ @aol.comwrote in message
news:Bt******** ************@gi ganews.com...
>Aaron Gray said the following on 3/12/2007 1:21 PM:
>>How do I call a function within an iframe from the container main
document ?

iFrameRef.func tionName();

I was using the "name" attribute rather than "id" on the IFrame !

Aaron

var theIFrame = document.frames["theFrameNa me"];
if((theIFrame)& &(theIFrame.the Function))
{
var theResult = theIFrame.theFu nction();
}

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 16 '07 #5

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

Similar topics

1
4347
by: Christian Radermacher | last post by:
Hi, the following code has the mentioned behaviour: <html> <head> <script type="text/javascript"> function newA() { for (i=0;i<3;i++) { var a = window.frames.document.createElement("a");
3
1743
by: Dennis M. Marks | last post by:
I have a function that displays a list extracted from a table using document.write. In the displayed list I want to have a link that will call the same function but display the list in reverse. Click HERE to reverse A B C When HERE is clicked the page will redisplay as
4
3638
by: nec | last post by:
Hi, I'm having trouble calling a function thats located in a iFrame from the parent. Shortly, i can't figure out the location in DOM. In IE it works fine with a simple line of window.contens.alerter('wassa?'), but it doesnt, of course work in Firefox (0.8). I've tried document.getElementById('contens').alerter('wassa?') and
9
3290
by: Ragnorack67 | last post by:
.... <div id=work>hello</div> .... <IFRAME id="thisframe" src="./something.htm"></IFRAME> <script>
2
4557
by: Randell D. | last post by:
Folks, I have got this working before, in part with some help from this ng but I never really understood how I got it working... and last time, I was using it via a popup window as opposed to an IFRAME. I've got several months of javascript under my belt and can resolve most things without errors in my Mozilla Javascript Console, but this one just does not do it for me. This is the picture:
5
4643
by: mike | last post by:
If I have a document like: <script> function mike_test() {alert('hi');} </script> <iframe src="blank.html" id="my_iframe1"> </iframe> and in blank.html I have:
13
6714
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is getting as far as the iframe section as other parts of the html code work correctly. But it is not executing any code within the getPage() function as some "hello world" writes within getPage() wouldn't print. ...
1
4763
by: evanburen | last post by:
I have an iframe inside of a parent page. How do I call the onChange function in the parent page from the ddlProfileNames dropdown in the iframe page? Thanks. code in parent page: <SCRIPT> function ordering(sorder) {
1
1638
by: Hocco | last post by:
Hello Everyone, Please help the novice in java scripting. I'm trying to call changeSection (x, y) function from the iframe. Basically I have my code and my iframe tag in index.html. Then I click on the menu button and it loads an iframe with the name art.html. I have a function that defines which page the user is currently on and writes the name of it. Here what I have in index.html <script type="text/javascript"> function...
9
2323
by: Cainnech | last post by:
Helo everybody, I'm having a problem with a functioncall from my iFrame. I have a page which houses an iframe. The contents of that is being generated in the script and has the following output: <html> <head> <script type='text/javascript'> function edt(idx) {
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
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
7471
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
5368
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...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.