[Javascript] Same-named functions (was link onclick=location.hrefnot working)

Chris T christ at saeweb.com
Tue Mar 30 12:21:45 CST 2004


Hmmm, I thought VBScript was MsgBox(), not alert().

Quick question... How many of you actually use VBScript? I'm talking
client-side, not server-side.

Chris Tifer



----- Original Message ----- 
From: "Peter Brunone" <peter at brunone.com>
To: <javascript at LaTech.edu>
Sent: Tuesday, March 30, 2004 12:47 PM
Subject: [Javascript] Same-named functions (was link
onclick=location.hrefnot working)


> > What I don't know
> >is what would happen if you had 2 functions (one JS and one VB) by the
same
> >name. I'm too lazy to find out though :)
>
>   Never say "what if" around me; you'll get either the answer or endless
speculation.  In this case, I put together a small sample for IE6, and the
result was a trip to Bizarro World.  Consider the following:
>
> <form>
> <input type="button" onclick="Gabooga()" value="Call VBScript Function">
&nbsp;
> <input type="button" onclick="gabooga()" value="Call Javascript Function">
> <br>
> </form>
> <script language="Javascript">
> function gabooga() {
> alert("gabooga javascript");
> }
> </script>
>
> <script language="VBScript">
> Function Gabooga
>    alert("Gabooga VBScript")
> End Function
> </script>




More information about the Javascript mailing list