popup date picker

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
 
P

Peter Blum

L

luna

yes but why should i pay for something that should be there in the first
place!!!
im learning because this would have other benefits too - like a pop up form
that can populate a form behind
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top