FYI,

I just got my new JavaScript guide (5th ed.), and there is a new use
of the "in" keyword to check property existence (see p.108 and Chapter
5). This use of what is now called the "in operator" is documented in
the book as being part of the JavaScript ECMA-262, version 3 standard
(available at 
http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf),
but I was unable to find the in operator documented within that
standard. The book also claims that everything documented in the book
(i.e., including the in operator) should be supported by IE4, as well
as Netscape 4.5 and any more recent versions of other browsers.

- Chris

On Nov 6, 4:28 pm, Chris Schneider <[email protected]> wrote:
> Dear Google AJAX Gurus,
>
> I'm trying to track down why Explorer can't display the Google Maps on
> my site. IE7 (running on a PC I no longer have access to) reports the
> same error as does my IE5.2 for the Mac OS. I worked up a minimal test
> case to demonstrate the problem, which prevents any of the Google Maps
> APIs from getting loaded (because google.load isn't successfully
> loaded).
>
> While loading the following test page:
>
> http://www.vulgarianramblers.org/ie7_google_bug.php
>
> Explorer will display the following alert (if 'Show scripting error
> alerts' is enabled):
>
> Microsoft JScript compilation error:
> Line: 23
> Char: 315
> Error: Expected ')'
>
> If you click the source button, it appears that the problem is due to
> the JavaScript code loaded fromhttp://www.google.com/jsapi?key=[my
> key] via the <script></script> tags on line 9 of my own source. Once
> the content fromwww.google.comis incorporated into my source, line
> 23 probably refers to the following line of google code:
>
> (function() {var
> d=true,f=null,g=false,h=encodeURIComponent,j=window,k=google,m=undefined,n=document;function
> p(a,b){return a.load=b}var
> q="push",s="replace",t="charAt",u="ServiceBase",v="name",w="getTime",x="length",y="prototype",z="setTimeout",A="loader",B="substring",C="join",D="toLowerCase";function
> E(a){if(a in F)return F[a];return F[a]=navigator.userAgent[D]().indexOf
> (a)!=-1}var F={};function G(a,b){var c=function(){};c.prototype=b
> [y];a.R=b[y];a.prototype=new c}
>
> Furthermore, it appears that the following JavaScript statement may be
> the source of the compilation error:
>
> if(a in F)return F[a];
>
> I only have the JavaScript 1.1 reference (JavaScript - The Definitive
> Guide, 2nd Ed.), in which only the "for ... in" construct is
> described. I saw one reference online to the use of "in" alluded to
> above, which appears to make use of the fact that associative array
> keys are implemented as object properties (Unfortunately, I'm unable
> to find that reference right now among the plethora of posts from
> people who suggest using .indexof or looping to search arrays.)
>
> If the above is truly legal JavaScript, then in what version was this
> new "in" construct introduced? What browser versions (particularly of
> Explorer) would support it?
>
> Thanks,
>
> - Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to