473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

possible to use hyperlink to call a vbscript sub?

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.
Jul 23 '05 #1
2 23790
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
Jul 23 '05 #2

"sumGirl" <em*****@netscape.net> wrote in message
news:a5**************************@posting.google.c om...
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.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dustin II. | last post by:
Hi, I have an ASP.NET solution, and the ASPX page I have a form , I want to copy some of the data from that form to the clipboard, I am using the below script the script works fine when I use a...
2
by: laura | last post by:
I am writing an intranet and want to be able to hyperlink to all files within a specific folder AND it's subfolders. Whilst I can hyperlink to the files in the specified folder AND I can also...
4
by: Amir Eshterayeh | last post by:
Dear Friends My asp hyperlink goes to relative address instead of absolute. I like navigate url goes to outsite link like www.asp.net but now, it goes to www.mysite/www.asp.net please help....
3
by: mcse4u | last post by:
I would like to be able to add a hyperlink to the posted form below that automatically creates a hyperlink of the email address of the person submitting the form. Can someone please help me with...
0
by: lechatthierry | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
1
by: Neko | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to block the windows shortcut SHIFT + MOUSE LEFT...
3
by: Looch | last post by:
Something simple here (hopefully)...how can I append the text in a text box to a hyperlink? For example, I enter the string 'Printer223'. There is an Excel file with the same name that I want to...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
2
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.