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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does A URL Exists

Status
Not open for further replies.

ChrisBelzona

Programmer
Oct 25, 2000
137
GB
I need to be able to input a URL address, check whether it is live, and return a true or false value depending on the result which will then be used in an if statement.

Many Thanks

Chris
 
Its kinda complicated and would only work in IE. have a hidden frame and load the page you are curious about in it. start a setInterval to check for the readystate of the frame and when it is clear the interval then use document.body.innerHTML and use indexOf to look for "Page cannot be displayed" if the result is greater or equal to 0, then load the page in a visible page. jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top