"ton" <> wrote in message
news:b5943$47bd6bff$541eee8e$1.nb.home.nl...
> Hi,
>
> I 've a problem. Consider 2 webforms
> webform1 got a button: in the Page_Load event, this code:
>
> Button1.Attributes.Add("onclick",
> "window.showModalDialog('webform2.aspx',null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no');")
>
> the 2nd form got a button2 in the Page_Load event, this code:
>
> Button2.Attributes.Add("onclick", "window.close();")
>
> what happens is that the second dialog is a nice pop-up, but after closing
> it is closed and RELOADED again (but then not as modal form and not in the
> specified height/width
>
> What am I doing wrong??
>
>
> Ton
>
>
>
>

as noted, the webform events are only fired by an async postback. control
extenders just subscribe to generic browser events (onclick, onfocus, etc),
so there is no generic tell me when you are done.

but some extenders will fire events your javascript can subscribe to. the
auto complete has several events (just look at the javascript code, the best
documentation). for autocomplete, maybe populated (fired after list is
loaded) is the event you want, not sure what you are trying to do.

-- bruce (sqlwork.com)

"ton" wrote:
> Hi,
>
> I 've a problem. Consider 2 webforms
> webform1 got a button: in the Page_Load event, this code:
>
> Button1.Attributes.Add("onclick",
> "window.showModalDialog('webform2.aspx',null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no');")
>
> the 2nd form got a button2 in the Page_Load event, this code:
>
> Button2.Attributes.Add("onclick", "window.close();")
>
> what happens is that the second dialog is a nice pop-up, but after closing
> it is closed and RELOADED again (but then not as modal form and not in the
> specified height/width
>
> What am I doing wrong??
>
>
> Ton
>
>
>
>
>

On Feb 21, 11:36 am, bruce barker
<> wrote:
> as noted, the webform events are only fired by an async postback. control
> extenders just subscribe to generic browser events (onclick, onfocus, etc),
> so there is no generic tell me when you are done.
>
> but some extenders will fire events your javascript can subscribe to. the
> auto complete has several events (just look at the javascript code, the best
> documentation). for autocomplete, maybe populated (fired after list is
> loaded) is the event you want, not sure what you are trying to do.
>
> -- bruce (sqlwork.com)
>
>
>
> "ton" wrote:
> > Hi,
>
> > I 've a problem. Consider 2 webforms
> > webform1 got a button: in the Page_Load event, this code:
>
> > Button1.Attributes.Add("onclick",
> > "window.showModalDialog('webform2.aspx',null,'status:no;dialogWidth:370px;d­ialogHeight:220px;dialogHide:true;help:no;scroll:no');")
>
> > the 2nd form got a button2 in the Page_Load event, this code:
>
> > Button2.Attributes.Add("onclick", "window.close();")
>
> > what happens is that the second dialog is a nice pop-up, but after closing
> > it is closed and RELOADED again (but then not as modal form and not in the
> > specified height/width
>
> > What am I doing wrong??
>
> > Ton- Hide quoted text -
>
> - Show quoted text -

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!