Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Iron Speed
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 23rd, 2002, 05:06 PM
BladeTMC2 BladeTMC2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: AMsterdam
Posts: 43 BladeTMC2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 8
Send a message via ICQ to BladeTMC2 Send a message via AIM to BladeTMC2
VBscripting

Hi,

I have a problem and javascript isnt giving any answers..

I have lets say 3 pages:

PHP Code:
 index.php
next
.php
last
.php 


And i want 2 loop them unlimited. SO displaying them each 20 seconds. Yeah i know the HTML meta refresh or the JAVASCRIPT SetTimeOut. But the main problem is, that i want the CLIENT 2 check if page is available and if

YES --> Reload Page
if
NO --> Wait X seconds and start over....


Can this be done with VBscript (Or javascript) as they say it couldnt be done easy.

I would like 2 get some help on this one.....

Blade.....
__________________
~~~~~~~~~~~~
~~BladeTMC~~
~~~~~~~~~~~~
[PHP]
function alrighty()
{
$f00fighter["alrighty"]="Only right way of using arrays";
}

[PHP]

Reply With Quote
  #2  
Old March 23rd, 2002, 07:18 PM
deepspring's Avatar
deepspring deepspring is offline
Is a Psycho
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: In your computer
Posts: 231 deepspring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via AIM to deepspring Send a message via Yahoo to deepspring
A few questions...

1. What page are you checking the availability for?
2. Do you mean availability as in "is it loaded into browser / frame"?
3. Are you using frames for this at all?

Is the following code what you meant (I am aware that some of the code isn't right, but it is only an example)?

Code:

<script language="javascript">
<!--
function checkForPage(page) {
  if (parent.someFrame.location == page) {
    parent.someFrame.reload();
  } else {
    return false;
  }
}

setTimeOut("checkForPage(\"http://somewhere.com/next.php\")", 2000);
//-->
</script>
__________________
deepspring

- "Netscape 4 users are like lemmings... You can't help but laugh when one falls off a cliff"

Last edited by deepspring : March 23rd, 2002 at 07:21 PM.

Reply With Quote
  #3  
Old March 23rd, 2002, 09:39 PM
BladeTMC2 BladeTMC2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: AMsterdam
Posts: 43 BladeTMC2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 8
Send a message via ICQ to BladeTMC2 Send a message via AIM to BladeTMC2
more like

1. What page are you checking the availability for?
The client checks a page @ http://www.something.com/index.php

2. Do you mean availability as in "is it loaded into browser / frame"?
as in "could be displayed, server is up" then reload the page

3. Are you using frames for this at all?
I dont use frames for updating, but it is frames my layout...


PHP Code:
<script language="javascript">
<!--
function 
timer() {
wait x secs
}

function 
checkForPage(page) {
  if (
parent.someFrame.location == page) {
    
parent.someFrame.reload();
  } else {
    
timer(1000);
  }
}

setTimeOut("checkForPage(\"http://somewhere.com/next.php\")"2000);
//-->
</script> 


but as u can c my javascript is ****ty :P

Reply With Quote
  #4  
Old March 24th, 2002, 03:01 AM
deepspring's Avatar
deepspring deepspring is offline
Is a Psycho
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: In your computer
Posts: 231 deepspring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via AIM to deepspring Send a message via Yahoo to deepspring
Hi,

I'm not sure javascript can do that (check if a server is up). javascript isn't that bad, just go to http://www.javascriptkit.com/ and do a few tutorials if you think you need to brush up.

I wish I could help you further, but I am not I understand properly what your trying to do. If you want to test if a server is up, you may want to use PHP instead of a client language like Javascript or VBScript (VBScript is Internet Explorer only). I'm not that great at Javascript either.

Sorry, if I got your hopes up. Hopefully somebody else will be able to help you better.

Last edited by deepspring : March 24th, 2002 at 03:03 AM.

Reply With Quote
  #5  
Old March 24th, 2002, 06:28 AM
BladeTMC2 BladeTMC2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: AMsterdam
Posts: 43 BladeTMC2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 8
Send a message via ICQ to BladeTMC2 Send a message via AIM to BladeTMC2
Thxs m8

Thxs for your time....

and i sure hope somebody can help me with this

PS. Its for IE and not for others.... so VBscript.. np

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > VBscripting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway