JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2001, 01:23 PM
scream scream is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 456 scream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 7 m 3 sec
Reputation Power: 13
Send a message via ICQ to scream
Red face

Here is a link I have on my page:

<a href="#" onClick="hide('rateLayer')">click here</a>

I use it to call a javascript function, but it allows has another effect. The link is on the bottom of a page so when it is clicked, the href="#" causes the page to scroll back up to the top.

Can someone show me how to re-write the link so this doesn't happen? I think you can do href="javascript:" or something like that.

Thanks!

Reply With Quote
  #2  
Old February 20th, 2001, 07:43 AM
waldthau waldthau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Colorado
Posts: 46 waldthau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
You could try some code like this:

<a href=javascript:hide('rateLayer')>click here</a>

Hope that helps.
__________________
- MW

Reply With Quote
  #3  
Old February 20th, 2001, 10:06 AM
jkd jkd is offline
CF sMod
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Maine, USA (a.k.a. Boonies)
Posts: 242 jkd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 43 sec
Reputation Power: 13
Send a message via ICQ to jkd Send a message via AIM to jkd Send a message via Yahoo to jkd
Here are some methods to making a dead link:

<a href="javascript:void(null)">
<a href="javascript:void(0);">
<a href="javascript://">
<a href="thisPartDoesntMatter" onclick="return false">

__________________
Jason Contact Me
Super moderator @ CodingForums

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > really simple javascript question

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap