View Full Version : Conditional Scripts For Google Maps

04-13-2009, 02:58 PM
Let me start by saying that I have no idea what I am talking about.

We purchased Dreamweaver MX and I put up a web site which I finally decided to update.

I put up a location page with google maps and for one of the domain names it works fine, for the other the key is wrong.

I have found examples of how to build a script but can't get any of them to work. I need to execute the script with one of 2 keys.

I can get the If/Else to work but the building or executing of the script always fails.

<script type="text/javascript">
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.google.com/maps?file=api&v=2.x&key=MYKEY";

I can't get the above code to work and after 4 days, I declare that I can't figure out why.


04-13-2009, 03:34 PM
i take it your using a proper key and not MKEY

04-13-2009, 04:17 PM
Yep, I have 2 proper keys which will make the 2 domain names work but as of now only 1 at a time.