943,584 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 3763
  • ASP.NET RSS
Sep 22nd, 2008
0

pop up window opening behind main

Expand Post »
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.
ASP.NET Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Oreo1982 is offline Offline
16 posts
since Jun 2008
Sep 22nd, 2008
1

Re: pop up window opening behind main

Quote ...
onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180')"
href="javascript:;"
Try

ASP.NET Syntax (Toggle Plain Text)
  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

ASP.NET Syntax (Toggle Plain Text)
  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);"
Reputation Points: 66
Solved Threads: 56
Posting Pro in Training
Fungus1487 is offline Offline
459 posts
since Apr 2007
Sep 22nd, 2008
0

Re: pop up window opening behind main

[QUOTE=Fungus1487;696738]Try

ASP.NET Syntax (Toggle Plain Text)
  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!!!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Oreo1982 is offline Offline
16 posts
since Jun 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: how to work with linux server while i have made application using asp.net using c#
Next Thread in ASP.NET Forum Timeline: Create Pagination table or GridView - .NET C#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC