Soldato
- Joined
- 27 Mar 2003
- Posts
- 2,710
I am trying to get some asp code to work.
Now I have not really done much asp but have managed to tweak some existing code on one of our websites to work.
The code in question is designed to load one of several different maps up. ie form live,google or a custom one from our map creation system.
Now I managed to get the code working perfectly fine using the live maps and our custom maps before I decided it would be good to offer google maps as an option.
The code is split into two sections.
1) loads the body tag plus the map function
2) loads the script code for the map .
Now the only way I can see this working is using a nested if statement something like this:
now the code I want to getting working is this:
The rest of the code was done by someone else and when I insert this code into the rest of it I get an internal server error. but if i put the original code that I had created back into it then it seems to work fine except I can't bring up the google maps.
so any ideas what I am doing wrong or how I can fix this.
I know I may be missing something obvious here.
Now I have not really done much asp but have managed to tweak some existing code on one of our websites to work.
The code in question is designed to load one of several different maps up. ie form live,google or a custom one from our map creation system.
Now I managed to get the code working perfectly fine using the live maps and our custom maps before I decided it would be good to offer google maps as an option.
The code is split into two sections.
1) loads the body tag plus the map function
2) loads the script code for the map .
Now the only way I can see this working is using a nested if statement something like this:
Code:
if map = google then
load google map
else
if map = live then
load live
else
map = custom
end if
end if
now the code I want to getting working is this:
Code:
--check if our custom map
<%if Left(objRS2(1),4) = "<div" or left(objRS2(1),4) = "auto" then %>
<body class="BodySet">
--check if live maps
<% else
if InStr(1,objRS2(1) = "dev.virtualearth.net" then %>
<body class="BodySet" onload="GetMap();">
<%else %>
--else it will be google maps
<body onload="load()" onunload="GUnload()">
<% end if%>
<%End If %>
Code:
<% if Left( objRS2(1),4) = "<div" or Left( objRS2(1),4) = "auto" then %>
<td colspan="10"><Center><%= objRS2(1) %></Center></td>
<%else
if InStr(1,objRS2(1) = "dev.virtualearth.net" then %>
<tr>
<td colspan="10"><Center><%= objRS2(1) %></Center><div id='myMap' style="position:relative; width:800px; height:400px;"></div>
<INPUT id="show" type="button" value="Show" name="show" onclick="ShowControl();">
<INPUT id="hide" type="button" value="Hide" name="hide" onclick="HideControl();"></td>
</tr>
<%else %>
<tr>
<div id="map" style="width: 800px; height: 400px"></div>
</tr>
<%end if%>
<%end if%>
The rest of the code was done by someone else and when I insert this code into the rest of it I get an internal server error. but if i put the original code that I had created back into it then it seems to work fine except I can't bring up the google maps.
so any ideas what I am doing wrong or how I can fix this.
I know I may be missing something obvious here.