Passing values to a sub or function using ONCLICK 
Author Message
 Passing values to a sub or function using ONCLICK

I have a VBScript function that prints the contents of an image display in
an ActiveX control (LeadTools 10). In ASP I have derived the page width and
height (using my own ActiveX control). I need to pass these two values to
the VBscript function when the user clicks a link i.e. using:

ONCLICK=printImage('12345','6789')

But this does not work (syntax error)

Any ideas?



Thu, 21 Mar 2002 03:00:00 GMT  
 Passing values to a sub or function using ONCLICK
John,

Try

ONCLICK='printImage("12345","6789")'

VBScript uses the ' as start of comment.  HTML will allow ' or " to enclose a
string.

Marvin Thompson

Quote:

> I have a VBscript function that prints the contents of an image display in
> an ActiveX control (LeadTools 10). In ASP I have derived the page width and
> height (using my own ActiveX control). I need to pass these two values to
> the VBscript function when the user clicks a link i.e. using:

> ONCLICK=printImage('12345','6789')

> But this does not work (syntax error)

> Any ideas?



Thu, 21 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Passing Value from Module Function to Form sub problem

3. Sub(V1): passed by value or by reference?

4. Passing Values To TextBox from a Sub

5. Pass Session value to a VB Sub

6. Sub(V1): passed by value or by reference?

7. Passing arrays from a server-function/sub to a server -variable

8. Passing an array to a sub or function I get type mismatch

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

10. Local function/sub inside function/sub

11. Problem Passing Data Using onClick in Form

12. Passing a value from a sub-report

 

 
Powered by phpBB® Forum Software