Current location: Hot Scripts Forums » Programming Languages » ASP » How to delay a frame load


How to delay a frame load

Reply
  #1 (permalink)  
Old 06-27-03, 05:25 AM
nachetex nachetex is offline
New Member
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How to delay a frame load

I have a page with two frames, frame A makes a connection with a database and fills a Session variable with data, this Session var is then used in frame B two to show the data. The problem is that when the connection to internet is slow it seems that frame A takes long time to finish load and the data is not shown in frame B
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-27-03, 07:13 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
Since your using ASP it would be a lot more efficient to use includes instead of frames.

Other than that since ive never had to do somethin like this before you could you could put the scripting in the actual frameset page
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-28-03, 07:59 PM
Gurrutello Gurrutello is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
hello
i foun this one somewhere

is a preloading with an iframe
but you can modelate to your needs

PHP Code:

<html>

<
head>
<
title>How to Pre-load an HTML Page</title>

<
script type="text/javascript">
function 
Is() {
    
agent  navigator.userAgent.toLowerCase();
    
this.major parseInt(navigator.appVersion);
    
this.minor parseFloat(navigator.appVersion);
     
this.ns = ((agent.indexOf('mozilla') != -1) && 
          (
agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) &&
         (
agent.indexOf('opera') == -1) &&
         (
agent.indexOf('webtv') == -1));    
    
this.ns2   = (this.ns && (this.major      ==    3));
    
this.ns3   = (this.ns && (this.major      ==    3));
    
this.ns4   = (this.ns && (this.major      ==    4));
    
this.ns6   = (this.ns && (this.major      >=    5));
    
this.ie    = (agent.indexOf("msie")       !=   -1);
    
this.ie3   = (this.ie && (this.major      4));
    
this.ie4   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   ==   -1));
    
this.ie5   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   !=   -1));
    
this.ieX = (this.ie && !this.ie3 && !this.ie4); 
}

var 
is = new Is();

var 
url 'http://www.publicentral.com';

</script>

</head>

<body onLoad="location.href = url;">

<H1>Page is loading...</H1>

<script type="text/javascript">
if (document.layers)
document.write('<layer src="' + url + '" visibility="hide"><\/layer>');

else if (document.all || document.getElementById)
document.write('<iframe src="' + url + '" style="visibility: hidden;"><\/iframe>');

else location.href = url;
</script>

</body>
</html> 
saludos
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 06-30-03, 04:49 PM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to delay a frame load

Quote:
Originally posted by nachetex
I have a page with two frames, frame A makes a connection with a database and fills a Session variable with data, this Session var is then used in frame B two to show the data. The problem is that when the connection to internet is slow it seems that frame A takes long time to finish load and the data is not shown in frame B
Like stealth said, you should try putting the asp code in the frameset page.
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 10-26-03, 09:48 AM
Xtremist Xtremist is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Pensacola, FL
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
you could always use a delay command for ASP. This will be set to delay the page for a specific amount of time....
You could even use a animated gif to show that the page is loading then go to a blank image in like 5 seconds or so.... then the page would load.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 10-26-03, 05:30 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
thats still hoping that the page executes last. all manor of things can go wrong
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 10-28-03, 10:46 AM
sequill's Avatar
sequill sequill is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Alexandria, VA
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Just thinking out loud.....

Frame A:
Does what it has to do. When it's finished it adds a unique ID to a file/db
(maybe session ID)

Frame B:
Checks to see if it's session ID is in the file/database. If it's there, that means that Frame A is loaded and Frame B continues.. else it redirects to itself and checks again..and again..again...until the session ID is found in the DB

Issues (maybe) :
Infinate loops
Creating the unique ID
Will have to clean up the DB every so often

The people who pay me insist that I actually work for my money, so I don't have time to slap this one together.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applet won't load. NEED HELP!!! AznStyl Everything Java 0 09-23-03 12:29 PM
Entries load failed. Marko PHP 1 07-18-03 08:58 AM


All times are GMT -5. The time now is 08:41 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.