JavaScript - How to check url exist or not - Asked By Tejaswini Prashant J on 20-Apr-10 03:05 AM

Hi,
     I want to check in JavaScript whether an url (simple or re-written) is exist or not.
     I tried using xmlHttp object and by request.open(for MyTestUrl) but it's giving me error as- Acceess to restrcited uri denied...

Anybody have idea how I can check thru JS whether url is exist or not?
Mash B replied to Tejaswini Prashant J on 20-Apr-10 03:17 AM
We have posted the solution for this in the below link,

http://www.eggheadcafe.com/community/aspnet/17/10162669/how-to-check-to-make-sure.aspx
Tejaswini Prashant J replied to Mash B on 20-Apr-10 03:52 AM
Hi,
but I want pure JS solution..so posted here in JS section :)
Santhosh N replied to Tejaswini Prashant J on 20-Apr-10 03:59 AM
this thread has similar discussion which should help you in this regard on how to check the existance of the url in javascript but remember you need to use ajax at minimum to do so...as you might be aware javascript is just client side
http://bytes.com/topic/javascript/answers/527502-how-check-url-existence