469,934 Members | 2,607 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

problem integrating java window.open with VB


....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

Aug 10 '06 #1
1 1557
Jeff,

Have a look at the page class and than particulary the both register script
methods
http://msdn2.microsoft.com/en-us/lib...e_members.aspx

I hope this helps,

Cor
"Jeff" <no**@none.comschreef in bericht
news:44***********************@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

Aug 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Phil Powell | last post: by
13 posts views Thread by BlackHawke | last post: by
7 posts views Thread by Grant | last post: by
5 posts views Thread by Steve | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.