Page 1 of 1

html anchors help

Posted: Mon Mar 29, 2004 10:19 am
by yaron
Hello all,

'm using php but my question is more of an html/javaScript question that I hope you can help me with.

I have a php script which I output a lot of data devided into subjects.
each subject has a title which is a html anchor.
There can be up to 1000 subjects/anchors in my html output page.
I want to help the user browse through my massive output by those anchors.
I want to give him the ability to choose the anchor name (in my case an icremented number) and then click on a button that will bring him to the write place in my output page.

can it be done?

Re: html anchors help

Posted: Mon Mar 29, 2004 12:10 pm
by TheBentinel.com
You can create a <SELECT> with <OPTION>'s for each anchor. Then your "GO" button would change the document.location.href to whatever anchor they selected. You can see an example of it on cnn.com, look at the bottom of the page where you can select "languages".

View source and you'll see the code running it. They do it onChange of the select, so there's no Go button.