Clicking on link makes page jump to top

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Clicking on link makes page jump to top

    Hello,
    I have a page where a link will dynamically hide and show a table (using
    javascript to change the table's style display:none and display:block). Click
    the link once and it will show it, click again, it will hide it, etc. Very
    simple. The table is very long, so once it opens (shows) you need to scroll
    down to see it's bottom. After the first table, I have another link, and
    another table to sho/hide just like the first one.

    Now the issue here is that I use <a href="#"
    onClick="javascript:showHide('infoTable1');>View Prices</a>

    Because the href property is just a "#" thing (since it doesn't need a real
    link), that causes the page to jump to the top, when you try to open the second
    table (because it's way way down at the bottom). How can I make the page NOT
    jump to the top of the page when I'm opening the tables?

    TX

    --LES

    pentool Guest

  2. Similar Questions and Discussions

    1. Starting a video in a layer when clicking on a link
      Hi I was wondering if there was any dhtml or java script for showing a video clip in a layer when clicking on a link. what im realy aiming for is to...
    2. Cant get data from table after clicking url link. Pleaseadvise.
      I am setting up an auction listing website. I have an upload page delivering data to a table called auctions which contains the columns of name,...
    3. auto 'jump' to link
      I've seen this somewhere (or I've gone crazy), but a function in PHP that automatically forwards you to another web page. If want to do an 'if x=5...
    4. [PHP] auto 'jump' to link
      if ($x == 5) header('Location: http://blah.com/blah'); This what you were looking for? Also make sure this is sent before any other output ...
    5. Stored procedure help, makes server jump to 100%
      Hello, we have a users table with the following fields: client_id varchar 20 counter1 int counter2 int .. .. .. counter50 int
  3. #2

    Default Re: Clicking on link makes page jump to top

    <a href="javascript:showHide('infoTable1')"> probably solve your dilemma.
    Alper Bulu? Guest

  4. #3

    Default Re: Clicking on link makes page jump to top

    Thanks for the reply, but no, it doesn't solve it.
    pentool Guest

  5. #4

    Default Re: Clicking on link makes page jump to top

    Show me the page, please. I need to see what you tried.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "pentool" <webforumsuser@macromedia.com> wrote in message
    news:djqvl3$gco$1@forums.macromedia.com...
    > Thanks for the reply, but no, it doesn't solve it.

    Murray *TMM* Guest

  6. #5

    Default Re: Clicking on link makes page jump to top

    just drop an anchor somewhere on the page where you want your page to jump when sombody click the link, give it a name of top/middle/bottom, then add the name to the # sign in your link (ex: #middle)
    cna Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139