0

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:TextBox ID="txtDate" runat="server" ForeColor="#3366CC" BackColor="#E1ECFC" TabIndex="1"></asp:TextBox>&nbsp;
                <a onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180')"
					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

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Oreo1982
Featured Replies
  • [QUOTE]onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180')" href="javascript:;"[/QUOTE] Try [CODE]onclick="window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180');return false;" href="javascript:void(0);" [/CODE] And if that fails you could always try [CODE]onclick="var w = window.open('popup.aspx?textbox=txtDate','cal','width=250,height=225,left=270,top=180');w.focus();return false;" href="javascript:void(0);" [/CODE] Read More

1

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

Try

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

And if that fails you could always try

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

Try

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

Thanks... that worked great!!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.