Jump to content

Recommended Posts

I got a map center problem. I try a 7 java script and every have same error. when I put embed google map on first tab works normally, on any other tab is not centered. I search and find that iframe must be in another html file via ajax but that didn't help, I got same error repeating. work for this 5 days and no answer, anybody got idea?

 

http://www.exclusivetours.hr/en/accommodation/apartments/710/apartmani-andrejka-app-2+1

 

here is a link!

<!--start tab -->	
<style>
dl 			{display:block; vertical-align:top; margin-top: 5px; width:444px; }
dl dt 		{height:30px; width:200px; display:block; float:left;  text-align:left; border-right:1px dotted #333; margin-right:10px; padding-right:10px; }
dl dd 		{height:30px; display:block; clear:right; text-align:left;  }
dl dt em   { float: left; display:inline; font-style:normal; font-weight:normal;}
dl dd em   { float: left; display:inline; font-style:normal; font-weight:normal;}
dl dt img   { float: right; display:inline; }
dl dd img   { float: right; display:inline; }
dl dt strong   { float: right; display:inline; font-style:normal; font-weight:normal; }
dl dd strong  { float: right; display:inline; font-style:normal; font-weight:normal; }
.stars { float: right; display:inline; }
.stars img { float:none; }

/*
-----------------------------------------------------------
*/

#smjestajhead:hover { cursor:hand; cursor:pointer; }
#opremahead:hover { cursor:hand; cursor:pointer; }
#udaljenostihead:hover { cursor:hand; cursor:pointer; }
#cjenikhead:hover { cursor:hand; cursor:pointer; }
#mapahead:hover { cursor:hand; cursor:pointer; }
</style>

<script>
function ShowWeur(oznaka)
{
n1 = document.getElementById('smjestaj');
n2 = document.getElementById('oprema');
n3 = document.getElementById('udaljenosti');
n4 = document.getElementById('cjenik');
n5 = document.getElementById('mapa');

n11 = document.getElementById('smjestajhead');
n22 = document.getElementById('opremahead');
n33 = document.getElementById('udaljenostihead');
n44 = document.getElementById('cjenikhead');
n55 = document.getElementById('mapahead');

color_mark = "#FF6600";
color_none = "#FFFBE5";

font_color_none = "#333333";
font_color_mark = "#FFFFFF";

if(oznaka == "smjestaj") { 
	n1.style.display = "block"; n11.bgColor = color_mark; n11.style.color = font_color_mark;
	n2.style.display = "none"; n22.bgColor = color_none; n22.style.color = font_color_none;
	n3.style.display = "none"; n33.bgColor = color_none; n33.style.color = font_color_none;
	n4.style.display = "none"; n44.bgColor = color_none; n44.style.color = font_color_none;
	n5.style.display = "none"; n55.bgColor = color_none; n55.style.color = font_color_none;

} else if(oznaka == "oprema") { 
	n1.style.display = "none"; n11.bgColor = color_none; n11.style.color = font_color_none;
	n2.style.display = "block"; n22.bgColor = color_mark; n22.style.color = font_color_mark;
	n3.style.display = "none"; n33.bgColor = color_none; n33.style.color = font_color_none;
	n4.style.display = "none"; n44.bgColor = color_none; n44.style.color = font_color_none;
	n5.style.display = "none"; n55.bgColor = color_none; n55.style.color = font_color_none;

} else if(oznaka == "udaljenosti") { 
	n1.style.display = "none"; n11.bgColor = color_none; n11.style.color = font_color_none;
	n2.style.display = "none"; n22.bgColor = color_none; n22.style.color = font_color_none;
	n3.style.display = "block"; n33.bgColor = color_mark; n33.style.color = font_color_mark;
	n4.style.display = "none"; n44.bgColor = color_none; n44.style.color = font_color_none;
	n5.style.display = "none"; n55.bgColor = color_none; n55.style.color = font_color_none;

} else if(oznaka == "cjenik") {  
	n2.style.display = "none"; n22.bgColor = color_none; n11.style.color = font_color_none;
	n1.style.display = "none"; n11.bgColor = color_none; n22.style.color = font_color_none;
	n3.style.display = "none"; n33.bgColor = color_none; n33.style.color = font_color_none;
	n4.style.display = "block"; n44.bgColor = color_mark; n44.style.color = font_color_mark;
	n5.style.display = "none"; n55.bgColor = color_none; n55.style.color = font_color_none;
} else {  
	n2.style.display = "none"; n22.bgColor = color_none; n11.style.color = font_color_none;
	n1.style.display = "none"; n11.bgColor = color_none; n22.style.color = font_color_none;
	n3.style.display = "none"; n33.bgColor = color_none; n33.style.color = font_color_none;
	n4.style.display = "none"; n44.bgColor = color_none; n44.style.color = font_color_none;
	n5.style.display = "block"; n55.bgColor = color_mark; n55.style.color = font_color_mark;
}
return false;
}

</script>

<table border="0" cellpadding="0" cellspacing="0" width="450">
  <tr>
    <td id="smjestajhead" class="text-info" onclick="ShowWeur('smjestaj'); return false;" align="center" bgcolor="#FF6600" width="160" height="25" style="color:#fff;">{LNG.accomodation.group.about_object}</td>
    <td width="1"></td>
    <td id="opremahead" class="text-info" onclick="ShowWeur('oprema'); return false;" align="center" bgcolor="#FFFBE5" width="100" height="25">{LNG.accomodation.group.equipment}</td>
    <td width="1"></td>
    <td id="udaljenostihead" class="text-info" onclick="ShowWeur('udaljenosti'); return false;" align="center" bgcolor="#FFFBE5" width="110" height="25">{LNG.accomodation.group.distances}</td>
    <td width="1"></td>
    <td id="cjenikhead" class="text-info" onclick="ShowWeur('cjenik'); return false;" align="center" bgcolor="#FFFBE5" width="90" height="25">{LNG.accomodation.group.price_list}</td>
    <td width="1"></td>
    <td id="mapahead" class="text-info" onclick="ShowWeur('mapa'); return false;" align="center" bgcolor="#FFFBE5" width="90" height="25">{LNG.accomodation.group.mapa}</td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="280">
  <tr>
    <td height="5" bgcolor="#FF6600"></td>
  </tr>
  <tr>
    <td bgcolor="#FFFBE5">


<table id="smjestaj" style="display: block;" align="center" border="0" cellpadding="10" cellspacing="0" width="464">
  <tr>
    <td align="left" valign="top">

<dl>
	{tabs.about_object}
</dl>


</td>
  </tr>
</table>

<table id="oprema" style="display: none;" align="center" border="0" cellpadding="10" cellspacing="0" width="464">
  <tr>
    <td align="left" valign="top">

<dl>
	{tabs.equipment}
</dl>


</td>
  </tr>
</table>

<table id="udaljenosti" style="display: none;" align="center" border="0" cellpadding="10" cellspacing="0" width="464">
  <tr>
    <td align="left" valign="top">

<dl>
	{tabs.distances}
</dl>

</td>
  </tr>
</table>

<table id="cjenik" style="display: none;" align="center" border="0" cellpadding="10" cellspacing="0" width="464">
  <tr>
    <td align="left" valign="top">

	{CIJENE}

</td>
  </tr>
</table>

<table id="mapa" style="display: none;" align="center" border="0" cellpadding="10" cellspacing="0" width="464">
  <tr>
    <td align="center" valign="top">

	  {podaci.mapa}

</td>
  </tr>
</table>

</td>
  </tr>
  <tr>
    <td height="15"></td>
  </tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/242759-google-maps-in-tabs-not-centered/
Share on other sites

ups,instead od podaci.mapa it's

 

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?msa=0&ie=UTF8&t=h&msid=207450623227831231014.0004a8c49deb050e279b4&source=embed&z=15&output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?msa=0&ie=UTF8&t=h&msid=207450623227831231014.0004a8c49deb050e279b4&source=embed&ll=43.907014,15.504284&spn=0.005411,0.00912" style="color:#0000FF;text-align:left">Apartmani Andrejka</a> in a larger map</small>

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.