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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My page keeps jumping to top

Status
Not open for further replies.

nivone

Programmer
Jul 2, 2002
33
IL
HI,

I have a page with a button (form) that when clicked it opens a pop up generated by Perl.
My problem is that after the pop up is loaded, the "father" page scroll bar jumps to the top.
What should I do in order to keep the energetic page in place?

This is the code I use in the form:

<form>
<font color=&quot;#000000&quot;>
<input type=&quot;submit&quot; STYLE=&quot;font-family: Arial; font-size: 10pt; color: #000000; background: #fffff0;&quot; value=&quot;More...&quot; name=&quot;more&quot; onClick=openWin('##NAME##')>
</font>
</form>

This is the code I use to define openWin():

<script language=&quot;JavaScript&quot;>
function openWin(name) {
day = new Date();
id = day.getTime();

myWin=window.open('../cgi-bin/machines_details.pl?'+name,id,'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=550,left = 200,top = 50');
}
</script>


Thanks
 
Change the type from submit to button and see if that makes a difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top