Click here to get back home

possible to use hyperlink to call a vbscript sub?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
possible to use hyperlink to call a vbscript sub? sumGirl 10-19-2004
Get Chitika Premium
Posted by sumGirl on October 19, 2004, 10:46 am
Please log in for more thread options
Is it possible to use a hyperlink to call a vbs sub? I have seen folks
using javascript to do this, but I cannot make it work with vbs and I
need to.

Please no "you should use javascript" answers. Unfortunately I am
where I am and I have to use vbs.


Posted by Harlan Messinger on October 19, 2004, 3:14 pm
Please log in for more thread options

> Is it possible to use a hyperlink to call a vbs sub? I have seen folks
> using javascript to do this, but I cannot make it work with vbs and I
> need to.
>
> Please no "you should use javascript" answers. Unfortunately I am
> where I am and I have to use vbs.

Where you are you are only allowed to write scripts that won't work in any
browser but Internet Explorer?

You'll find many messages in this forum about why you shouldn't use the

<a href="javascript: ...">

construction, but if that's what you're talking about, the corresponding
construction for VBScript is

<a href="vbscript: ...">

Type vbscript:msgbox("hello") into the Address line in IE and you'll see.



Posted by Philipp Lenssen on October 19, 2004, 5:51 pm
Please log in for more thread options
sumGirl wrote:

> Is it possible to use a hyperlink to call a vbs sub? I have seen folks
> using javascript to do this, but I cannot make it work with vbs and I
> need to.
>
> Please no "you should use javascript" answers. Unfortunately I am
> where I am and I have to use vbs.

It sounds like you already know you shouldn't do this in 99% of all
circumstances, so I'll just provide you with the HTML (which is
actually using a function, not a sub, but it may be what you need):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en">
<head>
<title>Calling VBS on the Client-Side</title>
<script type="text/vbscript">
function helloWorld
msgbox "Hello World"
end function
</script>
</head>
<body>

<a href="vbscript:helloWorld">Click me!</a>

</body>
</html>

--
Google Blogoscoped
http://blog.outer-court.com


Similar ThreadsPosted
FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP and more... May 27, 2008, 10:52 pm
How do I call a program August 18, 2005, 11:12 pm
Table to CSS - call for help August 7, 2007, 2:08 pm
Call for Presentations - Open Publish 2007 January 2, 2007, 4:01 pm
Call for Papers Opens for ApacheCon US 2008 March 1, 2008, 3:04 pm
Call for Papers Extended for ApacheCon US 2008 April 2, 2008, 10:53 pm
XML 2005 Call for Papers Ends May 13 --- Keynotes Announced May 5, 2005, 2:25 pm
WWW/Internet 2006: Call for Papers (Murcia, Spain) June 30, 2006, 12:09 pm
Optimal way to call a sound file on a mouse/button click. August 5, 2004, 7:28 am
Deadline for discounted hotel rate for XML 2005 is Oct 21 - Call for Posters/XML Artwork now open October 17, 2005, 10:38 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap