Forum Moderators: open

Message Too Old, No Replies

stopping page reloading

         

ksvijay

6:21 am on Jun 29, 2005 (gmt 0)

10+ Year Member



I have a jsp page,(problem in netscape only)

and i have an icon if i click this icon the page is exanding and a button is shown and i drag the page and place the button at bottom of the monitor and i clicking a button, then another pop up window is opening and i select some value from taht popup window, after i select values, what is the problem is after i selecting values from pop up window the main window is reloading.and the page is showing from first line,(ie the button is not in the bottom portion of the monitor and it moves up) what i need is i want to keep the main window as in the same position after i selecting values from pop up window,

how can i do that one pls help me

bubblebug

9:33 am on Jun 29, 2005 (gmt 0)

10+ Year Member



Hi

On your button is there a url link to #

ie

<a href="#" onClick="window.open('blah','blah','etc')">The Link Here</a>

If so the link is doing the pop up and looking for an anchor on the page where the button sits. It does not find one and jumps to the top of the page.

If you use...

<a href="javascript:;" onClick="window.open('blah','blah','etc')">The Link Here</a>

...it should stop that.

I am not sure from your post exactly what methods you use but I can remember this happening to me once or twice.

Hope this helps.

ksvijay

9:57 am on Jun 29, 2005 (gmt 0)

10+ Year Member



NO i ma not using href tag

<jnew:button property="orange.paper.addOnce" Class="button" onclick="javascript:addOncePro();">Add New</jnew:button>

this is that button, i am draging the main window just below and i click this button. One pop up window is opening, and i select a value, then in the main window
one text field added and filled with the value which i select.What is the problem is the after i selecting value the pop up window closed ,and the field filled with the value the main window is going above, so i have to drag that main window, then only iam able to see the filled values, i need that the main window should be in the same position (that is the position before i click the button)This is happening only in Netscape only

bird

10:22 am on Jun 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<jnew:button ...

That doesn't mean anything in HTML. What does the browser really see?

What is the problem is the after i selecting value the pop up window closed ,and the field filled with the value the main window is going above, so i have to drag that main window, then only iam able to see the filled values

You need to make sure that addOncePro() returns false.
If an onClick handler returns false, then the browser will stop at that point. If it returns anything else, then the browser will jump to the location of the href attribute. Apparently Netscape assumes the current document if the href attribute is missing.

Btw: I think that an <a> tag without either a href or a name attribute is invalid HTML.