Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help

Status
Not open for further replies.

mg911

Technical User
Jul 18, 2001
59
US
is there a way in VBscript to return a error message either in a box or in a log file if a web page does not appear
 
What do u rely mean...
If the page is not loaded yet u dont run any script on the page and u dont know if there is an error on the page... ________

George
 
an example would be is if i am trying to test to see if a web page comes up -

like

if ( = loads
return to text file - page loaded
else
return to text file - page did not load

they can return an error message to the screen but preferably to a file -

thanks for the help and assistance
 
U have to use window.open and window.opener
try this example


page1.htm

<HTML>
<script language=&quot;vbscript&quot;>
window.status=&quot;This is page 1&quot;
set wnd=window.open(&quot;page2.htm&quot;,null, &quot;height=200,width=400,status=yes,toolbar=no,menubar=no,location=no&quot;)
msgbox wnd.opener.status
msgbox wnd.status
</script>
</HTML>

in this example wnd is a reference to the new opened window and from that u could get the status of the window witch open the new window (opener property is the reference to the parent window and it has all the methods and property of parent window including status witch is &quot;This is Page 1&quot;)
wnd.status is a reference to the opened window and displays the status of this(if status of the new page is &quot;Page loaded&quot; means that the new page is loaded and do something...

page2.htm

<HTML>
<BODY onload=&quot;window.status='Page loaded';&quot;>
<P>The Page is Loaded</P>
</BODY>
</HTML>

if the new page is loaded set the status to &quot;Page loaded&quot; witch is finded in the page who open this window by the wnd object(this is the reference to the the new window)


hope this solve your problem it's verry simple to comunicate between windows with opener and open ... ________

George
 
is there anyway to do this every hour - i know i am asking a lot but i need help
 
Every hour?
If i understand then u...
If u are interesting to change every hour u must check the time when the asp or htm loads, even if u dont visit the page for 2 hours the next time u load tha page will chek the hour and see that was 2 hours ago last page querry...
If not u must provide me with some informations... ________

George
 
sorry i wasnt so clear -

can i maybe incorporate either VBScript or basic or some code to launch the browser every hour - to check to see the status of the web page -

Thanks again

 
U could use an VB aplication that's load the page or just use an sheduler that starting browser every hour... ________

George
 
Thanks for the input

ok how about something different - how about a load generator for a web server -

are there programs out there for putting load on one of these also -

help ???

Thanks for your time!

 
sorry disregrad that i thought i was in a different forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top