Closed Thread Icon

Preserved Topic: I need a javascript link that does nothing! (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17905" title="Pages that link to Preserved Topic: I need a javascript link that does nothing! (Page 1 of 1)" rel="nofollow" >Preserved Topic: I need a javascript link that does nothing! <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 01-03-2001 08:45

Okay, I am using this:
document.write("<a onClick=javascript:this.style.behavior='url(#default#homepage)';this.setHomePage(window.location);>Click here to make this page your default homepage!</a>");

When clicked, this will add the current page as the home page in IE.

Which works fine, except that the link isn't underlined. If I insert a href in the A tag, it is underlined. But using href='' causes the page the page to refresh to the root. href="#" causes the link to not be visible.

I remember seeing a link somewhere like "<a href="javascript:......." or something similar that basically did nothing. Does anyone remember what it is?

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Aquilo
Bipolar (III) Inmate

From: las vegas, nevada, us
Insane since: Nov 2000

posted posted 01-03-2001 14:57

well since that don't work in NN6 and cursor: hand style and many other styles don't work in it also you could just
use CSS to do it,

<STYLE TYPE="text/css">
.sethome { text-decoration: underline; cursor: hand; }
</STYLE>


<SCRIPT LANGUAGE="JavaScript">
document.write("<a class=sethome onClick=javascript:this.style.behavior='url(#default#homepage)';this.setHomePage(window.location);>Click here to make this page your default homepage!</a>");
</script>

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 01-03-2001 15:45

Yeah, I thought about doing that, but if I can find a JavaScript expression to do it the way I want, I'll be happy. If not, I'll do the CSS method.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 01-03-2001 17:42

<A HREF="javascript:void(0);" ONCLICK="alert('Blah!');">Blah!</A>

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 01-03-2001 17:53

That's it. I knew I was close.

Thanks for the help. I hate it when I can't remember the simple things!

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

« BackwardsOnwards »

Show Forum Drop Down Menu