By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,028 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,028 IT Pros & Developers. It's quick & easy.

Open Popup Window via VB Code

P: n/a
I have an asp:Button on my page. The buttons OnClick event runs some code. I
would like to have it also open a popup window.
Is this possible and how do I go about doing this?

Thanks,
Lou
Jul 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
a "Popup Window" is done client side with script, via window.open method.
There are dozens of javascript and HTML DOM references online where you can
find sample code. Would not, however, recommend you do this with VBScript -
use javascript instead.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Lou Civitella" wrote:
I have an asp:Button on my page. The buttons OnClick event runs some code. I
would like to have it also open a popup window.
Is this possible and how do I go about doing this?

Thanks,
Lou
Jul 12 '06 #2

P: n/a
You can attach a javascript function to your button

button.attributes.add("onclick", "window.open(...)")
Peter Bromberg [C# MVP] wrote:
a "Popup Window" is done client side with script, via window.open method.
There are dozens of javascript and HTML DOM references online where you can
find sample code. Would not, however, recommend you do this with VBScript -
use javascript instead.
Peter
Jul 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.