Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Cross browser compatibility issue - JavaScript Array / ASP JS

Reply
Thread Tools

Cross browser compatibility issue - JavaScript Array / ASP JS

 
 
dwair
Guest
Posts: n/a
 
      11-30-2006
Hi, I have been having browser compatibility issues and was wondering
if anyone could help.
I have been using a JavaScript array to populate marker data using ASP
JS in a google Maps project. For some reason the code works fine in
FireFox but not in Internet
Explorer (Run time error - expected ']' and 'markers' is undefined)
Any help would be gratefully received

--------------------------------------------------
<script type="text/javascript">
// get data from the db and plot the makers
var markers = [
<%while (!rstPropPoints.EOF){%>
{
'latitude':
<%=rstPropPoints.Fields.Item("lat").Value%>,
'longitude':
<%=rstPropPoints.Fields.Item("long").Value%>,
'propname':
'<%=rstPropPoints.Fields.Item('propname').Value%>' ,
'text': '<%=rstPropPoints.Fields.Item('text').Value%>',
'image':
'<%=rstPropPoints.Fields.Item('image').Value%>',
'type':
'<%=rstPropPoints.Fields.Item('sleeps').Value%>',
},
<%rstPropPoints.MoveNext();}rstPropPoints.Close(); %>
];
</script>
----------------------------------------------------

thanks - Hugh

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      11-30-2006
dwair wrote:
> Hi, I have been having browser compatibility issues and was wondering
> if anyone could help.
> I have been using a JavaScript array to populate marker data using ASP
> JS in a google Maps project. For some reason the code works fine in
> FireFox but not in Internet
> Explorer (Run time error - expected ']' and 'markers' is undefined)


Have you checked the code that arrives at IE? Is that syntatically
correct? Showing us the ASP code makes it hard for us to find the syntax
error.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      11-30-2006
dwair said:
>
>Hi, I have been having browser compatibility issues and was wondering
>if anyone could help.
>I have been using a JavaScript array to populate marker data using ASP
>JS in a google Maps project. For some reason the code works fine in
>FireFox but not in Internet
>Explorer (Run time error - expected ']' and 'markers' is undefined)
>Any help would be gratefully received
>
>--------------------------------------------------
><script type="text/javascript">
>// get data from the db and plot the makers
>var markers = [
><%while (!rstPropPoints.EOF){%>
> {
> 'latitude':
><%=rstPropPoints.Fields.Item("lat").Value%>,
> 'longitude':
><%=rstPropPoints.Fields.Item("long").Value%>,
> 'propname':
>'<%=rstPropPoints.Fields.Item('propname').Value%> ',
> 'text': '<%=rstPropPoints.Fields.Item('text').Value%>',
> 'image':
>'<%=rstPropPoints.Fields.Item('image').Value%>' ,
> 'type':
>'<%=rstPropPoints.Fields.Item('sleeps').Value%> ',
> },
><%rstPropPoints.MoveNext();}rstPropPoints.Close() ;%>
> ];
></script>
>----------------------------------------------------


It's going to be easier to spot the problem looking at the actual
generated code, rather than the ASP. Since there's probably too
much to look at easily, see if generating only the first half
reproduces the error, and so on until you've identified the
smallest amount of generated code that reproduces it and take a
look at that, and/or post it or a link to it.


--

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-browser compatibility of Asp.net v.1.1 & 2.0 =?Utf-8?B?cHJvZl9tYXJ0aW4=?= ASP .Net 1 04-25-2006 01:01 PM
Cross-browser compatibility of Asp.net 2.0 dejavue82@yahoo.com ASP .Net 7 03-15-2006 03:42 AM
Cross Browser compatibility question tom HTML 46 10-28-2004 05:20 PM
Problems with cross browser compatibility Sally Thompson HTML 8 06-19-2004 10:40 AM
cross browser compatibility jb HTML 16 12-08-2003 06:34 PM



Advertisments