[Javascript] Passing a variable to a Function

Chris Tifer christ at saeweb.com
Thu Nov 20 12:00:44 CST 2003


>From your example below, I am a little confused. is the second myVariable a
javascript variable, if so, how? Or is what's below some pseudo-code?  Tell
us what myVariable is and we can help. Let us know where it's coming from.
The way you have the javascript portion though, that is exactly how you'd
send a JavaScript variable to a function.

Chris Tifer
http://emailajoke.com


----- Original Message ----- 
From: <Kevin.Gutch at mapinfo.com>
To: "[JavaScript List]" <javascript at latech.edu>
Sent: Thursday, November 20, 2003 12:52 PM
Subject: [Javascript] Passing a variable to a Function


>
> I would like to pass a value to a function like this:
>
> <a href="javascript:myFunction('myData');">myData</a>
>
> however,
>
> I really want to pass a dynamic value/variable to the function. How would
I
> go about doing this in the function call? When I try it just gets passed
as
> a String.
>
> <a href="javascript:myFunction(myVariable);">myVariable</a>
>
> Am I making myself clear?
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list