Solved

VBScript question

Posted on 1998-08-13
1
291 Views
Last Modified: 2010-04-30
This is off the MSDN:
---------------------------------------------------
<CENTER>  
<P>  
<H2>Hello, world sample</H2>  
<INPUT TYPE=BUTTON VALUE="Click me" NAME="BtnHello">
</CENTER>
<SCRIPT LANGUAGE="VBScript">
<!--   Sub BtnHello_OnClick
      MsgBox "Hello, world!", 0, "My first active document"   End Sub-->
</SCRIPT>
------------------------------------------------
I cut and pasted this in and the OnClick doesn't run when
the button is pressed.Also, when IE first opens the page, the msgbox comes up... so it steps right through the code with no user input.
0
Comment
Question by:ds1964
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
TrEaSoN earned 100 total points
ID: 1468778
ds1964,
   Try this code instead...
---------------------------------------------------
<HTML>
<HEAD>
<TITLE> TrEaSoN'S Hello World Example! </TITLE>
<SCRIPT LANGUAGE = "VBScript">
<!--
    Sub cmdHello_OnClick()
       MsgBox "Hello, World!"
    End sub
-->
</SCRIPT>
</HEAD>
<BODY BGCOLOR = "White">
<FORM>
<INPUT TYPE = "BUTTON" NAME = "cmdHello" VALUE = "Click Me!">
</FORM>
</BODY>
</HTML>
-------------------------------------------------
If you have any further questions, just let me know.
-TrEaSoN-
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month5 days, 3 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question