Home All Groups Group Topic Archive Search About

problem integrating java window.open with VB

Author
10 Aug 2006 3:10 AM
Jeff
....still new to VWeb .net 2005 wtih VB...

....having some problem integrating java script to open a second browser window with my VB code. The following line (in page-load)
properly opens a new IE window (when button1 is pushed) called, "NewWin" and places the content from "comment.aspx" into it.

button1.Attributes.Add("onclick", "window.open('comment.aspx','NewWin',width=550, height=450');")
....but I can't seem to get any code - java or VB - to do anything with the new window. e.g., like closing it or setting focus to it.
Info on the web suggests that this should be possible, but I can't get anything to work. Perhaps this has something to do with the
necessity to somehow declare "NewWin" so that it is accessible outside of the page load event?

Could someone point me in the right direction, or provide some code with instructions easy enough for a VB newcomer to understand.

Thanks

Jeff









--
Posted via a free Usenet account from http://www.teranews.com

Author
10 Aug 2006 5:23 AM
Cor Ligthert [MVP]
Jeff,

Have a look at the page class and than particulary the both register script
methods
http://msdn2.microsoft.com/en-us/library/system.web.ui.page_members.aspx

I hope this helps,

Cor


Show quoteHide quote
"Jeff" <n***@none.com> schreef in bericht
news:44da8831$0$13399$88260bb3@free.teranews.com...
>
> ...still new to VWeb .net 2005 wtih VB...
>
> ...having some problem integrating java script to open a second browser
> window with my VB code. The following line (in page-load)
> properly opens a new IE window (when button1 is pushed) called, "NewWin"
> and places the content from "comment.aspx" into it.
>
> button1.Attributes.Add("onclick",
> "window.open('comment.aspx','NewWin',width=550, height=450');")
> ...but I can't seem to get any code - java or VB - to do anything with the
> new window. e.g., like closing it or setting focus to it.
> Info on the web suggests that this should be possible, but I can't get
> anything to work. Perhaps this has something to do with the
> necessity to somehow declare "NewWin" so that it is accessible outside of
> the page load event?
>
> Could someone point me in the right direction, or provide some code with
> instructions easy enough for a VB newcomer to understand.
>
> Thanks
>
> Jeff
>
>
>
>
>
>
>
>
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>