PDA

View Full Version : script for hide links



paradiso
01-02-2007, 06:52 AM
I need a script for my forum to set my links in hide so the must addreplay to see the link

wo can help me
Thnx so far my english is not so good maybe in dutch??

codeexploiter
01-02-2007, 07:37 AM
Hi

Are you looking for something using which you can hide/display your links?

Regards

paradiso
01-02-2007, 08:04 AM
yes that is what i want

codeexploiter
01-02-2007, 09:19 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function display(current,past)
{
var o1 = document.getElementById(current);
var o2 = document.getElementById(past);
alert(o1.style.visibility);

o1.style.visibility = "visible";
o2.style.visibility = "hidden";

}
</script>
</head>

<body>
<a id="google" href="http://www.google.com" style="visibility:hidden">Visit google</a>&nbsp;
<a id="yahoo" href="http://www.yahoo.com" style="visibility:hidden">Visit yahoo</a><br>

<input name="b1" type="button" value="display google" onclick="display('google','yahoo');">
<input name="b2" type="button" value="display yahoo" onclick="display('yahoo','google');">
</body>
</html>


You can check the above code that does what you want if you have any problem with the code let me know about it

chechu
01-02-2007, 12:30 PM
Can you explain the effect of this script,
as I do not understand very well the English used here ...
(beter je best doen !!)

codeexploiter
01-03-2007, 10:03 AM
Can you explain the effect of this script,
as I do not understand very well the English used here ...

If that question intended for me then the code snippet I provided will display and hide hyeperlinks (links) based on the button clicks.

queerfm
01-04-2007, 02:18 PM
no thats not the type of script i am looking for lets sat you are visting yahoo.com but in the address bar it says Yahoo Not Yahoo.com

Kinda when you lunch IE6 for the first time it shows that About Url in the page but you got to yahoo or google.

Thanks

chechu
01-06-2007, 02:53 PM
You need this ?

<head>:
<script language="JavaScript">
<!-- Hide the script from old browsers --

function a(txt) {
self.status = txt
}
function b() {
self.status = ""
}
// --End Hide -->
</script>

in the link:
a href="content.html" target="content" onMouseOver="a('TEXTONMOUSEOVER');return true" onMouseOut="b()">home</a></a>

chechu
01-06-2007, 02:54 PM
Sorry, second in the link needs to be this:

<a href="content.html" target="content" onMouseOver="a('TEXTONMOUSEOVER');return true" onMouseOut="b()">home</a>

odonel
03-21-2007, 12:46 AM
nice one exploiert, i have been looking for something like that... what if i have 6 links as oppose to just 2 links ?