Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Open a New Browser Window with VBScript

1,819 views
Skip to first unread message

Gary

unread,
Sep 21, 2007, 6:26:00 PM9/21/07
to
OK, I would think this would be easy but somewhere I'm missing something. I
have an HTML form and I want to open a new browser window. When I click a
button I call some VBScript and inside that VBScript I want to open a new
browser window. I thought that using window.open would work but I can't seem
tot get it to. Is there some magic I need to open a new window using
VBScript?

Thanks

Gary

Pegasus (MVP)

unread,
Sep 21, 2007, 6:37:51 PM9/21/07
to

"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:9A591C49-5EFE-4A07...@microsoft.com...

Dim ws
Set ws = CreateObject("WScript.Shell")
ws.Exec("c:\Program Files\Internet Explorer\iexplore.exe")


McKirahan

unread,
Sep 21, 2007, 6:46:44 PM9/21/07
to
"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:9A591C49-5EFE-4A07...@microsoft.com...

VBScript only works in IE browsers.
What have you developed so far -- just the basics, please.
What is the file extension -- .htm, .html, .hta, .vbs, or ???


Paul Randall

unread,
Sep 21, 2007, 11:03:58 PM9/21/07
to

"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:9A591C49-5EFE-4A07...@microsoft.com...

Hi, Gary
If you are trying to Open new window with ASP submit button , click on the
link to get some ideas.

Here is the dhtml window reference:
http://msdn2.microsoft.com/en-us/library/ms536651.aspx

-Paul Randall


Gary

unread,
Sep 21, 2007, 11:14:00 PM9/21/07
to
Here is what I'm trying to do. I have an html page that I want to open an
asp page in a seperate window. That's it's. I thought I could use
window.open but I can't seem to get it to work.

Gary

McKirahan

unread,
Sep 22, 2007, 8:54:42 AM9/22/07
to
"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:AEB01492-434D-4AF5...@microsoft.com...

> Here is what I'm trying to do. I have an html page that I want to open an
> asp page in a seperate window. That's it's. I thought I could use
> window.open but I can't seem to get it to work.

[snip]

<a href="page.asp" target="_blank">Open ASP page</a>


Gary

unread,
Sep 24, 2007, 2:04:00 PM9/24/07
to

"Paul Randall" wrote:

> OK, I'm confussed. This looks like Java Script. I was hoping to find a VBScript solution. Is there not one?
>

Gary

unread,
Sep 24, 2007, 2:08:00 PM9/24/07
to

"McKirahan" wrote:

I'm wanting to do this with a submit button call VBScript (asp). Is it
possible?

Gary
>
>
>

Gary

unread,
Sep 24, 2007, 2:06:46 PM9/24/07
to

"Pegasus (MVP)" wrote:

> I am wanting to open an asp page in a new browers window. How would I do that with this method?

Gary
>

Pegasus (MVP)

unread,
Sep 24, 2007, 2:56:46 PM9/24/07
to

"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:D7446A79-79BE-4636...@microsoft.com...

I don't have an asp page to test it on but this should work:


Dim ws
Set ws = CreateObject("WScript.Shell")

ws.Exec("c:\Program Files\Internet Explorer\iexplore.exe http://www...asp")


McKirahan

unread,
Sep 24, 2007, 4:19:59 PM9/24/07
to
"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:F1EC37E2-BF58-4ABA...@microsoft.com...

Will one of these work for you?

<html>
<head>
<title>newWindows.htm</title>
</head>
<body>
<script type="text/javascript">
function js() {
window.open("http://www.google.com/index.html","win","");
}
</script>
<script type="text/vbscript">
Sub vbs()
window.open "http://www.google.com/index.html","win",""
End Sub
</script>
<form action="http://www.google.com/index.html" target="_blank">
<input type="submit" value="New Window 1">
<input type="button" value="New Window 2" onclick="js()">
<input type="button" value="New Window 3" onclick="vbs()">
</form>
</body>
</html>


Paul Randall

unread,
Sep 24, 2007, 5:08:47 PM9/24/07
to

"Gary" <Ga...@discussions.microsoft.com> wrote in message
news:FB344D52-B9A9-4F40...@microsoft.com...

Hopefully McKirahan's script works for you.

-Paul Randall


0 new messages