L
luna
ive read a few tutorials but im still not getting anywhere (most code ive
seen is code inline - im using codebehind VB and aspx)
im creating a link button that opens a popup calendar that once a date is
picked it posts back and populates the form
i think i know where the error lies im just unsure how to fix it
my code is like this :-
the form is called form1 and the page is called test.aspx
{
Dim clientscript As String
clientscript = "<script
language='javascript'>datepick_window=window.open('datepicker.aspx?formname=
Form1.caltest','datepick_window','width=300,height=300');datepick_window.foc
us();</script>"
RegisterStartupScript("openwindows", clientscript)
}
This succesfully opens a popup window called datepicker.aspx with the
following code :-
Dim strjscript As String = "<script language=""javascript"">"
strjscript = "window.opener." & _
HttpContext.Current.Request.QueryString("form1") & ".caltest = '" &
_Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</script" & ">"
RegisterStartupScript("openwindows", strjscript)
ive outputted the strjscript string to a label and the output is :-
window.opener..caltest = '27/03/2004';window.close();
im guessing its to do with the
HttpContext.Current.Request.QueryString("form1") part - but now im totally
stuck!
cheers
mark
seen is code inline - im using codebehind VB and aspx)
im creating a link button that opens a popup calendar that once a date is
picked it posts back and populates the form
i think i know where the error lies im just unsure how to fix it
my code is like this :-
the form is called form1 and the page is called test.aspx
{
Dim clientscript As String
clientscript = "<script
language='javascript'>datepick_window=window.open('datepicker.aspx?formname=
Form1.caltest','datepick_window','width=300,height=300');datepick_window.foc
us();</script>"
RegisterStartupScript("openwindows", clientscript)
}
This succesfully opens a popup window called datepicker.aspx with the
following code :-
Dim strjscript As String = "<script language=""javascript"">"
strjscript = "window.opener." & _
HttpContext.Current.Request.QueryString("form1") & ".caltest = '" &
_Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</script" & ">"
RegisterStartupScript("openwindows", strjscript)
ive outputted the strjscript string to a label and the output is :-
window.opener..caltest = '27/03/2004';window.close();
im guessing its to do with the
HttpContext.Current.Request.QueryString("form1") part - but now im totally
stuck!
cheers
mark