close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Domain API-Codes don't display

Thread began 4/01/2011 3:49 am by info346215 | Last modified 4/06/2011 10:51 am by Jason Byrnes | 1552 views | 5 replies |

info346215

Multiple Domain API-Codes don't display

Hello,

Ma client has two domains www.dr-jürgen-voigt.de and www.dr-juergen-voigt.de.
As I need 2 API codes, I inserted them as showed in google help and some forums, but it doesn't display with promaps configuration.

Attached find (1) the functioning code for 1 api (functioning) and (2) the snippet for the possible solution.
How is it to be done?

Thanks for fas reply and best regards
kluthwalledesign

(1)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Zahnarzt Dr. Jürgen Voigt Krefeld • ANFAHRT</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<script type="text/javascript" src="google_javascript/wagmp_map_1.js">/*wagmp*/</script>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmbJ2WJ7JRpfnx7gQZQ8tOxSCM3qo1s5a3CnYyocOPEFF-xvtfhRh0ImbFSmiHFORieQGoCK9QJw9og">/*wagmp*/</script>
<!-- TemplateEndEditable -->
<link href="fav_voigt.ico" rel="SHORTCUT ICON" title="Favicon" />
<link href="CSS/voigt.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* Fügen Sie CSS-Box-Modell-Korrekturen für IE 5* in diesen bedingten Kommentar ein. */
.thrColFixHdr #sidebar1 { width: 180px; }
.thrColFixHdr #sidebar2 { width: 190px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* Fügen Sie CSS-Korrekturen für alle IE-Versionen in diesen bedingten Kommentar ein. */
.thrColFixHdr #sidebar2, .thrColFixHdr #sidebar1 { padding-top: 30px; }
.thrColFixHdr #mainContent { zoom: 1; }
/* Mit der obigen proprietären Zoom-Eigenschaft wird IE die Eigenschaft hasLayout zugewiesen, die zur Verhinderung verschiedener Fehler erforderlich ist. */
</style>
<![endif]-->

<!--

//-->

</head>

----

(2)

<script type="text/javascript"> document.write( &#8232;* * * '<script src="http://maps.google.com/maps? &#8232;file=api&v=2&key=' + &#8232;* * * { &#8232;* * * * 'dr-jürgen-voigt.de': 'ABQIAAAAmbJ2WJ7JRpfnx7gQZQ8tOxSCM3qo1s5a3CnYyocOPEFF-xvtfhRh0ImbFSmiHFORieQGoCK9QJw9og',
'dr-juergen-voigt.de':'ABQIAAAAmbJ2WJ7JRpfnx7gQZQ8tOxSGzBORnT2x4UzbHRp1weuX7_URARSLfM2LTnC21CdL9wSU7QfVAM0tmA',&#8232;* * * }[location.host] + &#8232;* * * '" type="text/javascript"><\/script>' ); &#8232;* *</script>

Sign in to reply to this post

Jason ByrnesWebAssist

convert your map page to a php page and use php code to generate the api key:

php:
<?php

switch ((isset($_SERVER["SERVER_NAME"]))?$_SERVER["SERVER_NAME"]:"") {
    case 
"domain1.com":
        
$key "key1";
        break;
    case 
"domain2.com":
        
$key "key2";
        break;
   case 
"domain3.com":
        
$key "key3";
        break;
   default:
        
$key "key1";
        break;   
}
?>
<script type="text/javascript"  src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $key?>">/*wagmp*/</script>
Sign in to reply to this post

info346215

Clinet has serverplace without php

Thank you for your php-solution, but my client booked a basic server place without the possibility of performing php-pages.
Do you know another solution for displaying mutiple domian apis? (Forcing one domain?)

Thank you very much.
kluthwalledesign

Sign in to reply to this post

Jason ByrnesWebAssist

can you post a link where you have tried the javascript that is not working?

Sign in to reply to this post

info346215

Made workaround- but IE doesn't display

As my client has no php-compatible serverplace, I doubled the website's host file and made one website for each domain with the different API-code for each domain separately.
It functions, but doesn't display in Internet Explorer.
Please give me a solution how to display in IE.
Thank you in advance!
kluthwalledesign

Here the code for dr-jürgen-voigt.de

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Zahnarzt Dr. Jürgen Voigt Krefeld • ANFAHRT</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<script type="text/javascript" src="google_javascript/wagmp_map_1.js">/*wagmp*/</script>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmbJ2WJ7JRpfnx7gQZQ8tOxSCM3qo1s5a3CnYyocOPEFF-xvtfhRh0ImbFSmiHFORieQGoCK9QJw9og">/*wagmp*/</script>
<!-- TemplateEndEditable -->
<link href="fav_voigt.ico" rel="SHORTCUT ICON" title="Favicon" />
<link href="CSS/voigt.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* Fügen Sie CSS-Box-Modell-Korrekturen für IE 5* in diesen bedingten Kommentar ein. */
.thrColFixHdr #sidebar1 { width: 180px; }
.thrColFixHdr #sidebar2 { width: 190px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* Fügen Sie CSS-Korrekturen für alle IE-Versionen in diesen bedingten Kommentar ein. */
.thrColFixHdr #sidebar2, .thrColFixHdr #sidebar1 { padding-top: 30px; }
.thrColFixHdr #mainContent { zoom: 1; }
/* Mit der obigen proprietären Zoom-Eigenschaft wird IE die Eigenschaft hasLayout zugewiesen, die zur Verhinderung verschiedener Fehler erforderlich ist. */
</style>
<![endif]-->

<!--

//-->

</head>

Sign in to reply to this post

Jason ByrnesWebAssist

please post a link to the map page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...