pop up window opening behind main

Thread Solved

Join Date: Jun 2008
Posts: 11
Reputation: Oreo1982 is an unknown quantity at this point 
Solved Threads: 0
Oreo1982 Oreo1982 is offline Offline
Newbie Poster

pop up window opening behind main

 
0
  #1
Sep 22nd, 2008
I have an input form that requests a date from the user and have a pop-up window with a calendar in it. Problem is the window shows for less than a second and then goes behind the main page. I have used this exact code in several other places with no problem. The only difference that I know of/ can see is the name of the textbox that it fills when a date is selected. Here is the piece of code from the .aspx file.
  1. <asp:TextBox ID="txtDate" runat="server" ForeColor="#3366CC" BackColor="#E1ECFC" TabIndex="1"></asp:TextBox>&nbsp;
  2. <a onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180')"
  3. href="javascript:;"><asp:ImageButton ID="imgDate" AlternateText="cal" ImageUrl="Images/SmallCalendar.gif" runat="server" TabIndex="20" /></a>

Once i bring up the window via the task bar, it works as expected. As far as i can tell, there are no javascript or asp errors.


any help would be appreciated. This is the only thing preventing this project from going live.

Thank you in advance.

Greg
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 439
Reputation: Fungus1487 is on a distinguished road 
Solved Threads: 50
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Pro in Training

Re: pop up window opening behind main

 
1
  #2
Sep 22nd, 2008
onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180')"
href="javascript:;"
Try

  1. onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180');return false;"
  2. href="javascript:void(0);"

And if that fails you could always try

  1. onclick="var w = window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180');w.focus();return false;"
  2. href="javascript:void(0);"
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 11
Reputation: Oreo1982 is an unknown quantity at this point 
Solved Threads: 0
Oreo1982 Oreo1982 is offline Offline
Newbie Poster

Re: pop up window opening behind main

 
0
  #3
Sep 22nd, 2008
[QUOTE=Fungus1487;696738]Try

  1. onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180');return false;"
  2. href="javascript:void(0);"

Thanks... that worked great!!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 2296 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC