Error: missing } in XML expression  
Author Message
Francesco Moi





PostPosted: 2007-4-17 19:19:19 Top

javascript, Error: missing } in XML expression Hi.

I get this error message on my Firefox Error Console:
----------------
Error: missing } in XML expression
Source File: http://www.foo.com/js/maps.js
Line: 273, Column: 18
Source Code:
options2 = { title: "John was here", icon: icon1};
-----------------

The JavaScript code (I use Google Maps):
----
coords2 = new GLatLng(34.3155495, -140.013553246338);
options2 = { title: "John was here", icon: icon1};
marker2 = new GMarker(coords2, options2);
-----------

My JavaScript file's got "Content-Type: application/x-javascript"
headers and it uses Ajax.

It's the first time I get this error. Does anybody have any experience
with it?

Thank you very much.

 
Martin Honnen





PostPosted: 2007-4-17 19:55:00 Top

javascript >> Error: missing } in XML expression Francesco Moi wrote:

> I get this error message on my Firefox Error Console:
> ----------------
> Error: missing } in XML expression
> Source File: http://www.foo.com/js/maps.js
> Line: 273, Column: 18
> Source Code:
> options2 = { title: "John was here", icon: icon1};
> -----------------
>
> The JavaScript code (I use Google Maps):
> ----
> coords2 = new GLatLng(34.3155495, -140.013553246338);
> options2 = { title: "John was here", icon: icon1};
> marker2 = new GMarker(coords2, options2);

Can you show us more context, in particular more lines before the line
273? Or post the real URL.
Firefox supports E4X (ECMAScript for XML) and somehow the error message
sounds as if your code is interpreted as an XML literal.


--

Martin Honnen
http://JavaScript.FAQTs.com/