Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping page fixed when dispalying new window

Status
Not open for further replies.

c3media

MIS
Sep 24, 2005
47
US
Hi. I have an asp/htm page that clicks a link and a floating window appears with supplementary info. Works great.

My problem is that when I scroll down on the initial page to find the desired link, then click on it to display the requested floating window, the initial page always moves back to the top - and then I have to re-scroll down to click on the next desired link. I want the initial page 'not to move' after the window appears - so that I can easily click on several links one after the other.

help. thanks.
 
Does the link that opens a window look something like this:
Code:
<a href="#" onclick="some javascript to open a new window">click me</a>

If so, then the culprit is the # value for the href. That will cause your page to jump to the top. If this is your problem, then you can solve it with the following code:

Code:
<a href="[!]javascript:void(0)[/!]" onclick=".....">click me</a>

Or, you can always just put the location of the new page as the href and specify a target to open in a new window:
[small](this would be the preferred method because it requires no javascript)[/small]
Code:
<a href="[URL unfurl="true"]http://location_of_new_page"[/URL] [!]target="_new"[/!]>click me</a>


If this does not solve your problem then you will probably need to post back with a bit more information and possibly some code samples.

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
This sounds like a question on client-side behavior rather than a question specific to Active Server Pages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top