close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

spry tabbed panels conflict with map

Thread began 11/02/2014 12:21 pm by webdesignerwags | Last modified 11/04/2014 12:04 pm by webdesignerwags | 1058 views | 6 replies |

webdesignerwags

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']; ?>,&nbsp;WI&nbsp;<?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']; ?>&nbsp;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']; ?>">&nbsp;
<img src="http://moonshinenetwork.com/photos-bars/<?php echo $row_rsBars['photo2']; ?>" alt="photo taken at <?php echo $row_rsBars['bar_name']; ?>">&nbsp;
<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>

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

webdesignerwags

login info

Moved info to private:

Sign in to reply to this post

Jason ByrnesWebAssist

I added the following code just before the repeat region to reset the recordset to the first record.

<?php
$chk_rows = mysql_num_rows($rsBars);
if ($chk_rows > 0) {
mysql_data_seek($rsBars, 0);
$row_rsBars = mysql_fetch_assoc($rsBars);
}
?>
Sign in to reply to this post

webdesignerwags

you are awesome! I was just out on the page and it was fixed so I knew you must have done something.
So now I will need to add that to all of my pages? As you can see, I have several that are the same page - just different counties.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, on each page you will need to reset the recordset to the first record before the repeat region.

Sign in to reply to this post

webdesignerwags

I tried it with jquery but I didn't like it. I can't remember exactly why but I think there was way too much code.

I feel pretty good that I got this to work with the database!

I'm still struggling with the email for my new member form. My other post. I just can't get it to display the new member_id in the email.
Once I get that, I think I have everything working for this site.

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...