Open Popup Window via VB Code

L

Lou Civitella

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
 
G

Guest

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
 
J

John Prado

You can attach a javascript function to your button

button.attributes.add("onclick", "window.open(...)")
 
Joined
Mar 5, 2008
Messages
1
Reaction score
0
The question was how do you in VB script not JScript

Why do people give such rubbish answers? The question was not how to open a window in JScript or any thing else but VBScript.

Easy to do

There are a few ways using VBScript here is one that is simple and effective.

Window.Open "http://www.yoursite.yourdomain", "Window1", "Toolbar=No", "Menubar=No", "Scroolbar=No"

If you want the toolbar, menubar and or scroolbar you know what to do.

Jack

John Prado said:
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
>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top