G
Guest
Hi all,
I need to set a session variable and open a new window with a single click
of an asp.net button. My problem is that it always takes two clicks.. one
sets the session and the other opens the window... if i write the open window
code in the page load, then the window gets open on 1 click and no session
variable was saved...
any ideas how to get around this...
this is my code:
button click code =
Session("test") = Button46.Text
Button46.Attributes.Add("Onclick", "pickschedule()")
javascript function =
function pickschedule()
{
window.open("newWindow.aspx?", "_blank", "height=500, width=575, left=150,
top=150, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
thanks!
I need to set a session variable and open a new window with a single click
of an asp.net button. My problem is that it always takes two clicks.. one
sets the session and the other opens the window... if i write the open window
code in the page load, then the window gets open on 1 click and no session
variable was saved...
any ideas how to get around this...
this is my code:
button click code =
Session("test") = Button46.Text
Button46.Attributes.Add("Onclick", "pickschedule()")
javascript function =
function pickschedule()
{
window.open("newWindow.aspx?", "_blank", "height=500, width=575, left=150,
top=150, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
thanks!