I've done somthing similar with a selection pop-up box.
I use javascript on my main form to open a popup box. Then, when the user
selects their option, I use javasrcript to access a textbox on my parent
form, insert the text, then also use javascript to fire then postback event
on the main form, passing it the name of a submit button so any associated
events can be fired.
To access the controls on the parent form, I used:
window.opener.d ocument.all.tex tboxname.value
and
window.opener._ _doPostBack('bu ttonname', '')
I made the javascript dynamic as well... here is the javascript I created
for the popup window
// register javascript
if(!Page.IsClie ntScriptBlockRe gistered("fillA ndClose"))
{
string script = @"<script language=""java script"">" + "\r\n";
script += "function fillAndClose(em pid){\r\n";
script += "window.opener. document.all." +
Request.QuerySt ring["textbox"] + ".value=empid;\ r\n";
script += "window.opener. __doPostBack('" +
Request.QuerySt ring["button"] + "','');\r\n ";
script += "window.close() ;}\r\n";
script += "</script>\r\n";
this.Page.Regis terClientScript Block("fillAndC lose", script);
}
So, if I just pass in the name of the textbox and the name of the button in
a querystring, the popup window will use those on the main form.
HTH,
-Cliff
"EMW" <SomeOne@MicroS oftdotCom> wrote in message
news:40******** **************@ dreader2.news.t iscali.nl...
Hi,
Is it possible with VB.NET and Javascript to popup a window, after a
buttonclick, in which the user writes some text in a textbox and then when
that window is closed with a button, the text is posted back to the aspx
program?
If it is possible, please let me know some articles about this?
thanks,
Eric