473,811 Members | 3,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 23841
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>Callin g VBS on the Client-Side</title>
<script type="text/vbscript">
function helloWorld
msgbox "Hello World"
end function
</script>
</head>
<body>

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

</body>
</html>

--
Google Blogoscoped
http://blog.outer-court.com
Jul 23 '05 #2

"sumGirl" <em*****@netsca pe.net> wrote in message
news:a5******** *************** ***@posting.goo gle.com...
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="javascrip t: ...">

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
6212
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 normal anchor tag with the onclick event, but I want to be able to use an actual asp control like the hylperlink or linkbutton. I have tried the link button but it gives an error saying Compiler Error Message: BC30456: 'VBScript' is not a member of...
2
2340
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 iterate through the subfolders and list them, for some reason I cannot hyperlink to the sub folders. I am writing this software at home using a computer that has IIS and Windows 98 and am accessing this as my server from another computer on my network....
4
8957
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. I create the navigatURL from database dynamically. I see the same question mentioned here but the response is not souitable for me: http://www.dotnet247.com/247reference/msgs/11/57708.aspx
3
4621
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 the code I need to add? <%@language=vbscript%> <%option explicit dim fromMail
0
1847
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 BUTTON that open the Hyperlink in a new window for a Web application. I just want to capture the Shift click event and prevent it from opening a new page. Mouse Wheel didn't pose any problems but the other mouse buttons seems to ignore the...
1
1958
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 BUTTON that open the Hyperlink in a new window for a Web application. I just want to capture the Shift click event and prevent it from opening a new page. Mouse Wheel didn't pose any problems but the other mouse buttons seems to ignore the...
3
2311
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 open (Printer223.xls). Basically http://localhost/printers/whatever I put in the textbox.xls is what I'm after. Thanks.
20
3013
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 a control. I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx" which are in both the folder "/jobseeker/" and "/employer/". I have a user control "displayCompanyJobs.ascx" that is in my /applicant/
2
2814
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 which the unit was shipped. If the unit was not shipped, obviously there is no order number; the default value of this field on the data table is 0. Herein lies the problem; if the order number is 0, I do not want the grid to display anything. If...
0
9726
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10384
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7667
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.