Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 11th, 2006, 04:15 PM
Friend of Wrox
 
Join Date: Mar 2004
Location: Ottawa, , Canada.
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default iframe onLoad

I have this iFrame, that when it loads, changes the page, etc.. called the testLoader() function, which for now is only an alert box.
<iframe src="about:blank" onLoad="testLoader();"></iframe>

The issue is that when I on the fly create the iFrame, the onLoad function doesn't trigger the testLoader function.. I have changed the page of the iframe in hopes of getting the alert but to no avail.

function createIframe(id,app)
{
//method 1
 nIframe = document.createElement("iframe");
 nIframe.id = id
 nIframe.attachEvent('onLoad',app);
 document.body.appendChild(nIframe);

//method 2
 nIframe = document.createElement("<iframe id='" + id + "' onLoad='" + app + "'></iframe>");
 document.body.appendChild(nIframe);
}

If anyone has any idea, please let me know...

Reply With Quote
  #2 (permalink)  
Old January 11th, 2006, 04:42 PM
Friend of Wrox
 
Join Date: Mar 2004
Location: Ottawa, , Canada.
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Disregard, I found my mistake...

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Onload with AJAX Baco Intro Programming 0 June 11th, 2007 12:46 PM
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
onLoad functionality NEO1976 Javascript 0 May 23rd, 2006 09:38 AM
audio onLoad Larson HTML Code Clinic 2 February 21st, 2004 12:39 AM
two script onLoad mateenmohd Javascript 2 December 28th, 2003 12:12 AM



All times are GMT -4. The time now is 07:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.