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

vbscript/javascript

Status
Not open for further replies.

raji96

Programmer
Aug 7, 2001
64
US
I need to display a error message like the alert in javascript based on the url.

If url is then it should popup an error message .

if url is then it should not popup any error message.

I tried onload event of the body but somehow it never called the function instead loaded the page.

It can either be javascript or vbscript.

Thanks.
snebe
 
raji,

<body onload=&quot;vbscript: if not window.location.href=' then msgbox 'Not abc.com',vbokonly,'Error Message'&quot;>

this should accomplish what you are asking.

tsmith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top