By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,460 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,460 IT Pros & Developers. It's quick & easy.

Cross browser compatibility issue - JavaScript Array / ASP JS

P: n/a
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

Nov 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/
Nov 30 '06 #2

P: n/a
Lee
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.
--

Nov 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.