Forum Moderators: open
I have a page that lists a number of buildings. Each of the buildings is a link. Each building has a subset of properties that relate to it. What I want to happen when clicking one of the links is:
1. The properties within the building to be shown under the link of the building. This I have done as it is all driven by a number of queries to a database, etc.
2. A new window to open with details of the building that has been clicked on. Again this I have managed to do.
3. to remain at the same place on the original page that I clicked. The list is more than one screen long. This I have been unsuccessful in achieving. I have tried using the <a name=blah"> and <a href=#blah>, etc but this does not work. It could be that I have incorrect syntax, although I think it might be the fact that I am not setting the <a name.....> until the link is clicked which means that the <a href=#.....> has nothing to find until the page has been completely re-loaded, which is therefore too late.
I tried using meta refresh with a url of #blah, but this kept looping.
If anyone understands what I have written, and can help, please do.
Regards.
Delvsie.
<a href="whateverpagefornonjavascriptbrowsers.htm" onclick="doalljsstuff();return false;">
Th return false will stop the href from executing. This will allow the page to continue from the state before the click. Animated gifs will continue to play and the page will not reload.