[Javascript] Same-named functions (was link onclick=location.hrefnot working)
Peter Brunone
peter at brunone.com
Tue Mar 30 12:28:04 CST 2004
IIRC, alert() is actually a method of the document object, and therefore language-independent.
MsgBox is a bit more flexible, and works inside and outside of the browser environment.
Original Message:
>From: "Chris T" <christ at saeweb.com>
>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>
>
>> > 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">
>
>> <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>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
More information about the Javascript
mailing list