iPixel Posted January 11, 2010 Share Posted January 11, 2010 I need to find out how i can check a web URL. so for example... this website is, www.mywebsite.com so i need this to work like so : if(URL address is www.mywebsite.com) OR (URL address is www.mywebsite.com/index.php) { DO THIS } else { DO THAT } Thanks! Quote Link to comment Share on other sites More sharing options...
iPixel Posted January 11, 2010 Author Share Posted January 11, 2010 I got it function Check4Pop() { var myURL = window.location.href; //alert(myURL); if((myURL == "http://www.mywebsite.com/") || (myURL == "http://www.mywebsite.com") || (myURL == "http://www.mywebsite.com/index.php")) { document.getElementById("gopopup").style.display = 'block'; } else { document.getElementById("gopopup").style.display = 'none'; } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.