Link to home
Start Free TrialLog in
Avatar of Sanjiv Rajiv
Sanjiv RajivFlag for United States of America

asked on

Call function on URL base JavaScript

Here is my problem
I have only one template (A)  and have few links on that template and all the links are attached to (A) look and feel

I want to hide one image on template link how can I do that

So questions is I what to write a JavaScript that

If URL is https://www.experts-exchange.com/Web/Web_Languages/askQuestion.jsp   

Hide this image
or
if not Show this image

Let me know if you need more explanation
Avatar of jaysolomon
jaysolomon

if link1 is clicked then img1 or which ever img will be hidden on the next page?

is this correct?
<body onLoad="if (!self.location.href=="https://www.experts-exchange.com/Web/Web_Languages/askQuestion.jsp") document.getElementById('imgdiv').style.visibility='visible'">

<div id="imgdiv" style="visibility:hidden">
<img src="blah.gif">
</div>


Cd&
Avatar of Sanjiv Rajiv

ASKER

COBOLdinosaur

Code is not working
ASKER CERTIFIED SOLUTION
Avatar of EyeContact
EyeContact

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial