davidbaker29
01-23-2006, 10:43 PM
I am currently building a page that initially displays a list of categories e.g.
Category 1
Category 2
etc
Clicking on a category should cause a list of the items in the category to be shown e.g. clicking Category 1 should lead to:
Category 1
Item 1
Item 2 etc.
Category 2
I have implemented this part successfully. I have placed a hyperlink in each Category so that when it is clicked the page is refreshed, with a parameter 'categoryid' used to return the relevant items from the database.
My problem is that if there are a lot of categories, then clicking on say Category 27 returns the items successfully, but the refreshed page returns to the top, and the user has to scroll down to Category 27 again.
I have tried to add a link to Item 1 when Category 1 is clicked, however this does not work as Item 1 is not yet present on the page when Category 1 is clicked. Item 1 etc get written to the page, but the refreshed page goes back to the top.
I have also tried to add a link to itself (Category 1) when Category 1 is clicked. This simply leaves the page exactly as it is - Item 1 etc. don't get written to the page, since the code follows the link and ignores the later code to write the items to the page.
Any suggestions on how to overcome this will be greatly appreciated.
Thanks
Category 1
Category 2
etc
Clicking on a category should cause a list of the items in the category to be shown e.g. clicking Category 1 should lead to:
Category 1
Item 1
Item 2 etc.
Category 2
I have implemented this part successfully. I have placed a hyperlink in each Category so that when it is clicked the page is refreshed, with a parameter 'categoryid' used to return the relevant items from the database.
My problem is that if there are a lot of categories, then clicking on say Category 27 returns the items successfully, but the refreshed page returns to the top, and the user has to scroll down to Category 27 again.
I have tried to add a link to Item 1 when Category 1 is clicked, however this does not work as Item 1 is not yet present on the page when Category 1 is clicked. Item 1 etc get written to the page, but the refreshed page goes back to the top.
I have also tried to add a link to itself (Category 1) when Category 1 is clicked. This simply leaves the page exactly as it is - Item 1 etc. don't get written to the page, since the code follows the link and ignores the later code to write the items to the page.
Any suggestions on how to overcome this will be greatly appreciated.
Thanks