Call Sub functions with buttons 
Author Message
 Call Sub functions with buttons

Hello,

I know how to do this action, but i have a button like so:
<input type='button' name='store' value='Store'>

and a sub function called store

Sub store_onclick()

End Sub

but the button on this page is not calling the function what could I be
doing wrong here. I'm doing this on my other pages in the same manner and
its working just fine, except for this one page.

Shawn Regan



Mon, 02 Jun 2003 02:44:18 GMT  
 Call Sub functions with buttons
Here is an example, see if it works:
<HTML>
<HEAD><TITLE>A Simple First Page</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Button1_OnClick
        MsgBox "Mirabile visu."
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<H3>A Simple First Page</H3><HR>
<FORM><INPUT NAME="Button1" TYPE="BUTTON" VALUE="Click Here"></FORM>
</BODY>
</HTML>

You need to reference the <SCRIPT LANGUAGE="VBScript">

hope this helps...


Quote:
> Hello,

> I know how to do this action, but i have a button like so:
> <input type='button' name='store' value='Store'>

> and a sub function called store

> Sub store_onclick()

> End Sub

> but the button on this page is not calling the function what could I be
> doing wrong here. I'm doing this on my other pages in the same manner and
> its working just fine, except for this one page.

> Shawn Regan



Mon, 02 Jun 2003 06:03:41 GMT  
 Call Sub functions with buttons

I understand that but after i do the first call and have it write out a new
page with another <script src="somevbs.vbs"></script> the button on that
page doesn't work to call the second vbscript on that page. for some reason
it doesn't see it.



Tue, 03 Jun 2003 03:00:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Calling a sub or function using a variable through another sub or function

2. Returning sub or function name within a specific sub or function

3. Local function/sub inside function/sub

4. calling the right function or sub

5. HOWTO: Call JavaScript function from inside a VBScript Sub

6. calling a Javascript function from and asp Sub Routine

7. Calling a sub or function

8. Exit Sub from called Function

9. Who called this sub or function?

10. Finding called Sub and Functions in code.

11. Calling Sub or Function in another copy of the CURRENT database

12. Calling functions/subs using the string title - possible?

 

 
Powered by phpBB® Forum Software