[URL=http://www.webmasterworld.com/forum91/4935.htm]On another thread (on another forum) [/URL] I asked a question that was perhaps too hard or was not thought out well. I still wouldn’t mind to get it answer to it. However if you could just tell me how to jump to a link programmatically with javascript that was solved when I am trying to do? I mean I want to jump to a spot on the page (or anchor) with javascript. If this is possible can you tell me where I can find more information on how to do this or just tell me here. A question of less importance, because I can probably figure it out, is pressing the enter key when Tad navigating the equivalent of clicking as far as the event handler onclick is concerned? I know there are other event handlers that will be invoked at that instance but I was just wondering.
Sorry for being a newbie, but would really appreciate some help. Thanks Marc
@CrazyMerlinFeb 02.2006 — #if you mean can you make the page jump to an anchor visually, then yes you can using IE DOM, but not sure using standard DOM.
in IE DOM, there is an element method called scrollIntoView().
Not sure what you mean by your second question, but if you mean can you let someone use 'Enter' instead of 'Tab' to navigate through elements, then yes also.
For non-IE you can trap the 'event' and use 'event.which' to tell you what keycode was pressed. Enter is 13 I believe. You can then have a script that gets the id of the current element, then loops through the elements until it finds it and then moves on 1.
Both your problems work in one kind of browser, it's finding a cross-browser solution that's the tricky thing.