Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Iframe Module [...  Newbie question: how to communicate to webpage through IFrame - javascript?
Previous Previous
 
Next Next
New Post 8/29/2006 11:35 AM
User is offline Johannes Dolberg
19 posts
10th Ranked


Newbie question: how to communicate to webpage through IFrame - javascript? 
Hi,
I've just completed a google maps DNN module that loads fine in firefox... but wont show in IE. I thought that I could solve this by putting the google maps html part on a seperate html page and accessing this through an IFrame.
I did this and the maps shows just OK but I cant get to call any of the javascript functions on the html page.

I'm new to Iframes (both the DNN module and the "real" ones). I figure I'll just set the google maps aside for a while and just get a hello world example done that shows how to communicate through the Iframe.

My question to you all is: How would you go around firing a "hello world" alert  placed inside the Iframe html page from the outside (at the DNN module level). I've tried getting hold of the contentDocument by doing

document.getElementById("mapIFrame").contentdocument

but I cant access any of the javascript functions placed in the document.
I can't figure out why this is so, so I hope to get some ideas from all you guys
Best Regards,
Johannes

 
New Post 9/7/2006 3:07 AM
User is offline Axel Scheiwe
1 posts
www.crm.de
10th Ranked


Re: Newbie question: how to communicate to webpage through IFrame - javascript? 
You cannot access the content of the frame via the document you are in.

You need to get the frame content itself, usually done with

parent.frames[0].document


 
New Post 9/7/2006 5:05 PM
User is offline Johannes Dolberg
19 posts
10th Ranked


Re: Newbie question: how to communicate to webpage through IFrame - javascript? 
Hi,
thanks very much for the answer.
I tried this: parent.frames[0].document.helloWorld();
I get this in my javascript console:
parent.frames[0].document.helloWorld is not a function, so I'm still puzzled about this.
parent.frames[0].document.write("hello"); does give me the words "hello" written inside the Iframe.
Is it at all possible to call javascript functions embedded in Iframes?
Best Regards,
Johannes

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Iframe Module [...  Newbie question: how to communicate to webpage through IFrame - javascript?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Easily Build DNN Solutions with XMod
XMod makes it easy to build news articles, house listings, custom feedback forms, product reviews and much more - without programming
www.DNNDev.com
Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com
Alki Homes - Seattle, WA
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP