|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
VBscripting
Hi,
I have a problem and javascript isnt giving any answers.. I have lets say 3 pages: PHP Code:
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] |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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:
but as u can c my javascript is ****ty :P |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > VBscripting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|