Page Submit and Jump to Anchor?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce Duncan

    Page Submit and Jump to Anchor?

    I have a page/form...that has some junk at the top of the page and a bunch
    of select boxes in the middle of the page and a table at the bottom. When a
    user makes a change in one of the select boxes, I use javascript to submit
    the page (back to itself)..reload ing the other select boxes.

    The problem I have is that when the page submits, it comes back at the top
    and the user has to scroll down to the middle. I wanted to use <a
    name="jumphere" > but I wasn't sure how that would work after a submit
    (obviously I don't want the jump the first time the user enters the area).

    Any suggestions? Maybe 'cuz it's Monday...but I can't seem to think of any
    good ideas. Any help is appreciated!

    -bruce duncan


  • Michael Winter

    #2
    Re: Page Submit and Jump to Anchor?

    On Mon, 30 Aug 2004 14:38:47 -0400, Bruce Duncan
    <brucesaynotosp amwduncan@hotma il.com> wrote:

    [snip]
    [color=blue]
    > The problem I have is that when the page submits, it comes back at the
    > top and the user has to scroll down to the middle. I wanted to use <a
    > name="jumphere" > but I wasn't sure how that would work after a submit
    > (obviously I don't want the jump the first time the user enters the
    > area).
    >
    > Any suggestions? Maybe 'cuz it's Monday...but I can't seem to think of
    > any good ideas. Any help is appreciated![/color]

    Doesn't

    <form ... action="myPage. html#jumphere">

    work?

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.

    Comment

    • Bruce Duncan

      #3
      Re: Page Submit and Jump to Anchor?

      >[color=blue]
      > Doesn't
      >
      > <form ... action="myPage. html#jumphere">
      >
      > work?
      >
      > Mike
      >
      > --
      > Michael Winter
      > Replace ".invalid" with ".uk" to reply by e-mail.[/color]

      You're right...that would work in a normal situation but the page is calling
      itself so the action="".

      Anyhow, I figured it out...
      I have client-side code (Cold Fusion) that determines how the page was
      loaded (i.e. First time in, or javascript submit, etc). When the loaded
      type is from the select boxes I simply added the javascript code:
      location.hash = 'jumphere';

      Works like a charm.

      ....must be Monday

      -bruce duncan


      Comment

      • Michael Winter

        #4
        Re: Page Submit and Jump to Anchor?

        On Mon, 30 Aug 2004 15:35:17 -0400, Bruce Duncan
        <brucesaynotosp amwduncan@hotma il.com> wrote:
        [color=blue][color=green]
        >> Doesn't
        >>
        >> <form ... action="myPage. html#jumphere">
        >>
        >> work?[/color][/color]

        [snip]
        [color=blue]
        > You're right...that would work in a normal situation but the page is
        > calling itself so the action="".[/color]

        action="#jumphe re"

        [snip]

        Mike

        --
        Michael Winter
        Replace ".invalid" with ".uk" to reply by e-mail.

        Comment

        • Bruce Duncan

          #5
          Re: Page Submit and Jump to Anchor?

          >[color=blue][color=green]
          > > You're right...that would work in a normal situation but the page is
          > > calling itself so the action="".[/color]
          >
          > action="#jumphe re"
          >
          > [snip]
          >
          > Mike
          >
          > --
          > Michael Winter
          > Replace ".invalid" with ".uk" to reply by e-mail.[/color]


          Yea...I like that one better...thanks Michael!

          -bruce duncan


          Comment

          Working...