Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make subroutine work in HTM file?

Status
Not open for further replies.

vladk

Programmer
May 1, 2001
991
US
Hi,
I'm trying the code below work but it does not produce the message. Can anybody help?

Thank you

Vlad

<HTML>

<script LANGUAGE=&quot;VBScript&quot;>
sub mySub()
msgbox &quot;Hello!&quot;
end sub
</script>

<HEAD>
<title>Tax Calculation Type</title>
</HEAD>
<BODY>
<p>

<BUTTON TYPE=BUTTON>
<IMG SRC=&quot;T://Source/Utilities/signpost.gif&quot; onClick=mySub() HEIGHT=97 WIDTH=105 ALT=&quot;Starflower&quot; ALIGN=&quot;ABSMIDDLE&quot;>
<STRONG>Send It In!</STRONG>
</BUTTON>

</p>
</BODY>
</HTML>
 
Try using quotes:

onClick=&quot;mySub()&quot;

Also you can avoid the button tag.

<input type=&quot;image&quot; src=&quot;T://Source/Utilities/signpost.gif&quot; onClick=&quot;mySub()&quot;>

 
Thank you for the answers. I didn't try the function. The example without button tags does work! It still unclear why the button tags supress the message box.

Vlad

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top