Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2005, 03:52 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Alhambra, ca, USA.
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can you preload child html files to 1parent html?

Hello
I know that you can preload image files to html files like below:

function PW_Preload(src)
{
   var img = new Image();
   img.src=src;
}

function PreloadGraphics()
{
 PW_Preload('image1.gif');
 PW_Preload('image2.gif');
}

Can you preload several child html files to 1 parent html file with iframe???

Please don't ask me why I am doing this, I just need to know how.

 
Old January 22nd, 2005, 06:23 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I think you can do this with an <iframe> tag. Set the src attribute of the iframe to the page you want to preload, and then use CSS to hide the entire iframe.
That way, the contents will be loaded, while the frame won't be visible in the browser.

Can I ask why we cannot ask why you want to do this? ;)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old January 22nd, 2005, 01:27 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Alhambra, ca, USA.
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
It is too difficult to explain in word. I can email you my website link if you want to see why.

 
Old January 22nd, 2005, 01:28 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Alhambra, ca, USA.
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by bekim
 Imar,
It is too difficult to explain in words. I can email you my website link if you want to see why.

 
Old January 22nd, 2005, 04:17 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sure, if you want to. You can send me an e-mail through my profile page....

Cheers,

Imar




Similar Threads
Thread Thread Starter Forum Replies Last Post
jsp files and html files jamara ASP.NET 2.0 Basics 1 November 20th, 2006 07:03 AM
Generating multiple HTML files dunpeal ASP.NET 1.0 and 1.1 Professional 6 August 24th, 2006 07:16 AM
Two HTML files Question bonekrusher XSLT 2 August 10th, 2006 02:04 PM
.php files vs .html files pbuongiovanni PHP How-To 2 January 5th, 2006 04:15 AM
Open Window and Write HTML to Child Advice fs22 Javascript How-To 3 August 6th, 2005 02:04 PM





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