Re: JavaScript Arguments
by "Ryan Fischer" <ryan(at)gigabee.com>
|
| Date: |
Sat, 16 Nov 2002 15:32:30 -0500 |
| To: |
<hwg-languages(at)hwg.org> |
| References: |
connect |
| |
todo: View
Thread,
Original
|
|
> So, for the hell of it I tried using "/" to delineate
> the script arguments, e.g.:
>
> <A HREF="javascript:myscript(/string 1/, /string 2/, etc....
>
> I didn't know you could do this, but apparently you can?? (at least on
> my Mac, Netscape 4.7 and MS Explorer 4.01). The Javascript now gets
> the strings as "/string 1/", etc., though.
>
> My little O'Reilly books on Javascript don't mention this anywhere.
> Am I hallucinating? :-) Is this reliable??
No, this isn't reliable. I've never even heard of it before. To my
knowledge, the only acceptable string delimiters are " and '.
You're *required* to quote all strings in JavaScript. What you
specified, I think, is some sort of pattern. Could be wrong though, as
my knowledge of JS doesn't really extend that far past v1.2.
But, what would help, though, is seeing the actual code, because you
*shouldn't* have any trouble specifying quotes within quotes in
JavaScript and HTML. There's *always* a way around it, or so I've
found.
-Ryan Fischer
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.