spry tabbed panels conflict with map
I finally got spry tabbed panels to work dynamically. It's a bit clunky but it works.
They were working great until I put the map back on the page. Now there is an empty record showing up before the 3 good records.
http://moonshinenetwork.com/bars-sheboygan.php
Do you have any idea why that might be?
Here is code. If you need more access, let me know. Thank you so much!
<?php require_once('Connections/connMoonshine.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_connMoonshine, $connMoonshine);
$query_rsBars = "SELECT * FROM Bars WHERE county = 'Sheboygan' ORDER BY bar_name ASC";
$rsBars = mysql_query($query_rsBars, $connMoonshine) or die(mysql_error());
$row_rsBars = mysql_fetch_assoc($rsBars);
$totalRows_rsBars = mysql_num_rows($rsBars);
?>
<!doctype html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="utf-8">
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Moonshine Network</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/menu.css">
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script type="text/javascript">
/*wagmp*/
<?php include("webassist/google_javascript/wagmp_map_1.php"); ?>
</script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&key=AIzaSyBk_QNQvUEnfi3WRseIjwiTFIQUXJHIOik">/*wagmp*/</script>
</head>
<body>
<div id="wrapper100">
<div class="head_line"></div>
<div class="wrapper">
<div class="logo"><?php require_once('includes/logo.php'); ?>
<!-- end logo --></div>
<!-- head_block --><div class="head_block">
<div class="nav-top">
<?php require_once('includes/nav-top.php'); ?>
<!-- end nav --></div>
<div class="header">
<div class="tag"><?php require_once('includes/tag.php'); ?>
<!-- end phone --></div>
<!-- //header --></div>
<div class="clear"></div>
<!-- end head_block --></div>
<div class="clear"></div>
<!-- main nav -->
<?php require_once('includes/main-nav.php'); ?>
<!-- end main nav -->
<div class="bannerImages">
<!-- end bannerImages --></div>
<div class="main">
<div class="left">
<?php require_once('includes/nav-features.php'); ?>
<!-- end main-col1 --></div>
<div class="main-wide">
<h2 align="center" class="special-large-title">Bars in Sheboygan County</h2>
<?php do { ?>
<table class="bar-listings-outer" width="610" border="0" cellspacing="0" cellpadding="5">
<tr><td align="center">
<div id="<?php echo $row_rsBars['tabbed_panels_name']; ?>" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"><b><?php echo $row_rsBars['bar_name']; ?></b></li>
<li class="TabbedPanelsTab" tabindex="1">Menu</li>
<li class="TabbedPanelsTab" tabindex="2">Details</li>
</ul>
<div class="TabbedPanelsContentGroup">
<!-- tab 1 content --><div class="TabbedPanelsContent">
<table class="bar-listings" width="580" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><tr>
<td width="150" align="center"><img src="../images/beer-mug.png" alt="beer mug"></td>
<td width="350"><b><?php echo $row_rsBars['bar_name']; ?></b><br>
<?php echo $row_rsBars['street_address']; ?><br>
<?php echo $row_rsBars['city']; ?>, WI <?php echo $row_rsBars['zip']; ?><br>
<?php echo $row_rsBars['phone']; ?><br>
<a href="http://<?php echo $row_rsBars['website']; ?>" target="_blank"><?php echo $row_rsBars['website']; ?></a><br>
</td>
<td width="80" align="center" valign="top"><a href="http://<?php echo $row_rsBars['facebook']; ?>" target="_blank"><img src="../images/sm-facebook.png" width="25" height="25" alt="Facebook"></a> </td>
</tr></td>
</tr>
</table>
<!-- end tab 1 --></div>
<!-- tab 2 content --><div class="TabbedPanelsContent">
<table class="bar-listings" width="580" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><tr>
<td width="150" align="center"><img src="../images/beer-mug.png" alt="beer mug"></td>
<td width="350"><a href="http://<?php echo $row_rsBars['menu']; ?>" target="_blank"><span class="menu"><?php echo $row_rsBars['bar_name']; ?> Menu</span></a><br>
</td>
</tr>
</table>
<!-- end tab 2 content --></div>
<!-- tab 3 content --><div class="TabbedPanelsContent"><h4 align="left"><?php echo $row_rsBars['bar_name']; ?></h4>
<p align="left"><b><i>HOURS:</i></b> <?php echo $row_rsBars['hours']; ?></p>
<p align="left"><?php echo $row_rsBars['description']; ?></p>
<p align="left"><b>Features:</b><br>
<?php echo $row_rsBars['feature1']; ?><br>
<?php echo $row_rsBars['feature2']; ?><br>
<?php echo $row_rsBars['feature3']; ?><br>
<?php echo $row_rsBars['feature4']; ?></p>
<p align="center"><img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo1']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>">
<img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo2']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>">
<img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo3']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>"></p>
<!-- end tab 3 content --></div>
<!-- end tabbed panels content group --></div>
<!-- end tabbed panels --></div>
</td></tr>
</table>
<?php } while ($row_rsBars = mysql_fetch_assoc($rsBars)); ?>
<?php
mysql_free_result($rsBars);
?>
<table>
<tr>
<td align="center"><h4>Click markers on map to see info about bar.</h4>
<div id="wagmp_map_1" style="width: 600px; height: 450px; border:double; border-radius:5px;"></div></td></tr>
</table>
<!-- end main-col2 --></div>
<div class="clear"></div>
<!-- end main --></div>
<?php require_once('includes/poll-links.php'); ?>
<!-- end #wrapper --></div>
<div class="clear"></div>
<div class="footer100">
<div id="footer">
<?php require_once('includes/footer.php'); ?>
<!-- end #footer --></div>
<!-- end #footer100 --></div>
<!-- end #wrapper100 --></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/superfish.js"></script>
<script type="text/javascript" src="js/myscript.js"></script>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels3");
var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels4");
</script>
<script type="text/javascript" src="webassist/google_javascript/wagmp_maps.js">/*wagmp*/</script>
</body>
</html>