Link to home
Start Free TrialLog in
Avatar of kgp43
kgp43Flag for Denmark

asked on

Hide link until page is loaded

Hi,

How do I hide a link until the page is fully loaded?
Avatar of archrajan
archrajan

<a href = "mypage.html" id = "link1" style = "display:none">This link will show only on page loaded </a>

<script>
document.getElementById('link1').style.display = "";
</script>
</body>

put that before ur </body> tag
Avatar of kgp43

ASKER

Is there a way to include the JS script in the link instead?
ASKER CERTIFIED SOLUTION
Avatar of archrajan
archrajan

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
I can do that for you but it will work only for Internet Explorer, is this ok..?
Hi

Hope this should work


<a href = "mypage.html" id = "link1" style = "display:none">This link will show only on page loaded </a>

<body onLoad="document.getElementById('link1').style.display='block' ">



Avatar of kgp43

ASKER

working, thanks.