 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
langba
Joined: 21 Apr 2008 Posts: 6
|
Posted: Mon Apr 21, 2008 4:06 am Why does this expanding list always jumps to top of page? |
|
|
|
Once the list expands longer than what is displayed in the browser window, the list jumps to the top. Grrr!
www.freewebs.com/softwarelocations
I am no JavaScript wizard by any means. I got the code from Inside Dynamic HTML by Scott Isaacs, page 318, Expanding and Collapsing Outlines.
I would guess that the var pos = 0; has everything to do with it but my limited JS experience has not allowed any of my modifications to work without the dreaded A Runtime Error has occured.
Many, many thanks in advance for assistance with this! |
|
langba
Joined: 21 Apr 2008 Posts: 6
|
Posted: Tue Apr 22, 2008 8:14 am |
|
|
|
I decided to get my own domain.
The new site is www.softwarelocations.com
A colleague tells me the behavior of jumping to the top of a page is because of this tag: <a href="#">. The example of an expanding/collapsing list had this identical tag. When I take out the # character and use only <a href="">, the expanding stops working completely.
What does <a href="#"> do with the # character and what are my alternatives?
Thanks |
|
langba
Joined: 21 Apr 2008 Posts: 6
|
Posted: Tue Apr 22, 2008 10:12 am |
|
|
|
Got it...
Change <a href="#"> to just <a>. In the css, add a{cursor:hand;} otherwise you won't see a visual cue that you are hovering over a link, even though the link will still work without the hand. |
|
sticks464

Joined: 31 Dec 2006 Posts: 2311
|
Posted: Tue Apr 22, 2008 7:06 pm |
|
|
|
| Quote: |
A colleague tells me the behavior of jumping to the top of a page is because of this tag: <a href="#">. The example of an expanding/collapsing list had this identical tag. When I take out the # character and use only <a href="">, the expanding stops working completely.
What does <a href="#"> do with the # character and what are my alternatives? |
There must be a character/characters inside the quotes for the link to display as a link. I use <a href="#nogo"> and have no trouble. |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 3593 Location: Biloxi, MS
|
Posted: Thu May 28, 2009 6:56 pm |
|
|
|
| langba wrote: |
I decided to get my own domain.
The new site is www.softwarelocations.com
A colleague tells me the behavior of jumping to the top of a page is because of this tag: <a href="#">. The example of an expanding/collapsing list had this identical tag. When I take out the # character and use only <a href="">, the expanding stops working completely.
What does <a href="#"> do with the # character and what are my alternatives?
Thanks |
Might want to correct the following coding errors:
CSS
HTML |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|