Hi All
I am using PHP server-side scripting to create a collapsable menu. The script works by dynamically drawing a table based on the variables fed to it from the anchor tag. This means that everytime a user clicks on a menu option the page must reload, in order to redraw the table.
Now to my problem. Every time the page reloads it jumps to the top of the page. This is particularly annoying if the section of the menu you are expanding is at the bottom of the page. The solution, add an anchor, so that when the page reloads it jumps back to the relevant menu section.
I tried this and it does work, but I have a major problem. Lets say I want to expand a part of the menu. I click on the link, the menu reloads (in expanded form) and jumps to the appropriate section. Now assume, that I straight away decide this is not the section I want and collapse that section of the menu. I reclick on that section of the menu, but nothing happens. The page simply wont reload. It seems that because the page is already at the right section it doesn’t want to reload.
I know I could write a script to force the page to reload, but I must pass a variable to the server in order to display the page properly.
Here is what the link looks like:
<td><a name="test"></a><img src="image1.png" alt="arrow"> <a href="experience2.php?node=sub3_2#test" target="_self">Link</a></td>
I hope you can understand what I am talking about. I would much appreciate your thoughts on this.
Regards, Ben