In my web site template I have header style with an image in it with width of 200px. I then have a headertext style beside it, auto width to fit page, and text in it that says "Welcome". Below the header style with the image I have a spry accordion widget, width 200 px. Beside that I have a spry horizontal menu widget. Under this I have my content.
What I want to do is:
when I select say "Contact Us" from the menu my content changes to the Contact Us page, which it does, and the headertext value of "Welcome" change to "Contact Us".
Thanks
Winrol
spry menu shows spry content when clicked? Your solution is simple then: set additional spry content to dynamically change spry content of headertext from welcome to whatever.
You won't get much more help than that unless...
a.) you expect us to read your mind and somehow see the code that you failed to provide in your post
or
b.) you provide your code or a link to the page.
Ok, sorry, here is my index.dwt.php (template page) code:
The part I want to change dynamically is: <div class="header2" id="HeadTitle">Welcome</div>
I want the Welcome to change to "Current Events" if I select "Current Events" or change to whatever I select.
Hope this helps.
Winrol
==================
<?php require_once('../Connections/connEMJMarketing.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_connEMJMarketing, $connEMJMarketing);
$query_rsCurEvents = "SELECT speakerRequested, event, place, datebooked, starttime, ampm, endtime, ampm2 FROM Bookings ORDER BY datebooked ASC";
$rsCurEvents = mysql_query($query_rsCurEvents, $connEMJMarketing) or die(mysql_error());
$row_rsCurEvents = mysql_fetch_assoc($rsCurEvents);
$totalRows_rsCurEvents = mysql_num_rows($rsCurEvents);
?>
<!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">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Welcome to EMJ Marketing</title>
<!-- TemplateEndEditable -->
<link href="../NewEMJ.css" rel="stylesheet" type="text/css" /><!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; } /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<![endif]-->
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
table {
width: 896px;
color: #D6BD38;
background-image: url(../Images/gold_microphone5.jpg);
background-repeat: no-repeat;
}
body,td,th {
color: #D6BD38;
}
body {
background-color: #000;
}
a:visited {
color: #D6BD38;
}
a:link {
color: #D6BD38;
}
</style>
</head>
<body text="#D6BD38" link="#D6BD38" vlink="#D6BD38" alink="#D6BD38">
<div class="container">
<div class="header"><a href="../home.php"><img src="../Images/-gold-white.gif" alt="imgEMJ" name="Insert_logo" width="200" height="89" class="header" id="Insert_logo" style="background: #8090AB; display:block;" />
</a>
<!-- end .header --></div>
<div class="header2" id="HeadTitle">Welcome</div>
<div class="sidebar1">
<p align="center">Select a Speaker for Your Event</p>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Emcee </div>
<div class="AccordionPanelContent">
<br/>
<p><a href="../JohnLynch.php">John Lynch</a></p>
<p><a href="../MichaelBall.php">Michael Ball</a></p>
<p><a href="../RodPedersen.php">Rod Pedersen</a></p>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Motivational Speakers</div>
<div class="AccordionPanelContent">
<br/>
<p><a href="../BobMolle.php">Bob Molle</a></p>
<p><a href="../JohnLynch.php">John Lynch</a></p>
<p><a href="../MattDominguez.php">Matt Dominguez</a></p>
<p><a href="../RodPedersen.php">Rod Pedersen</a></p>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Sports Celebrities</div>
<div class="AccordionPanelContent">
<br />
<p><a href="../AmberHolland.php">Amber Holland</a></p>
<p><a href="../AngusReid.php">Angus Reid</a></p>
<p><a href="../DonNarcisse.php">Don Narcisse</a></p>
<p><a href="../JeremyODay.php">Jeremy O'Day</a></p>
<p><a href="../MattDominguez.php">Matt Dominguez</a></p>
<p><a href="../MikeAboumechrek.php">Mike Abou-Mechrek</a></p>
<p><a href="../NealHughes.php">Neal Hughes</a></p>
<p><a href="../RobertMimbs.php">Robert Mimbs</a></p>
<p><a href="../ScottSchultz.php">Scott Schultz</a></p>
</div>
</div>
</div>
<p align="center"><br />
Check Availability</p>
<form id="frmAvailabilty" name="frmAvailabilty" method="post" action="../Availability.php">
<p><span class="fltlft" id="sprytextfield1">
<label for="date3">Date:</label>
<input name="dateRequested" type="text" id="date3" size="20" />
<span class="textfieldRequiredMsg">A value is required.</span>
<span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<span id="spryselect1">
<label for="speaker">Speaker</label>
<br />
<select name="speaker" id="speaker">
<option selected="selected">Select a Speaker</option>
<option value="amberholland">Amber Holland</option>
<option value="angusreid">Angus Reid</option>
<option value="bobmolle">Bob Molle</option>
<option value="donnarcisse">Don Narcisse</option>
<option value="jeremyoday">Jeremy O'Day</option>
<option value="johnlynch">John Lynch</option>
<option value="mattdominguez">Matt Dominguez</option>
<option value="michaelball">Michael Ball</option>
<option value="mikeaboumechrek">Mike Abou-Mechrek</option>
<option value="nealhughes">Neal Hughes</option>
<option value="rodpedersen">Rod Pedersen</option>
<option value="robertmimbs">Robert Mimbs</option>
<option value="scottschultz">Scott Schultz</option>
</select>
<span class="selectInvalidMsg">Please select a valid item.</span></span><span><span class="selectRequiredMsg">Please select an item.</span></span> </p>
<p>
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
<p>
<textarea name="Available" cols="20" rows="5" readonly="readonly" id="Available">Your Speaker is not booked on that date. If you wish to book your speaker Contact Us.
</textarea>
<label for="notAvailable"></label>
</p>
<p>
<label for="notAvailable"></label>
<textarea name="notAvailable" cols="20" rows="5" readonly="readonly" id="notAvailable">Sorry, your speaker is booked for that day. Please select another day.</textarea>
</p>
<!-- end .sidebar1 -->
</form>
</div>
<div class="content">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="../OurSpeakers.php" title="Our Speakers" class="MenuBarItemSubmenu">Our Speakers</a>
<ul>
<li><a href="../AmberHolland.php" title="Amber Holland">Amber Holland</a></li>
<li><a href="../AngusReid.php" title="Angus Reid">Angus Reid</a></li>
<li><a href="../BobMolle.php" title="Bob Molle">Bob Molle</a></li>
<li><a href="../DonNarcisse.php" title="Don Narcisse">Don Narcisse</a></li>
<li><a href="../JeremyODay.php" title="Jeremy O'Day">Jeremy O'Day</a></li>
<li><a href="../JohnLynch.php" title="John Lynch">John Lynch</a></li>
<li><a href="../MattDominguez.php" title="Matt Dominguez">Matt Dominguez</a></li>
<li><a href="../MichaelBall.php" title="Michael Ball">Michael Ball</a></li>
<li><a href="../MikeAboumechrek.php" title="Mike Abou-Mechrek">Mike Abou-Mechrek</a></li>
<li><a href="../NealHughes.php" title="Neal Hughes">Neal Hughes</a></li>
<li><a href="../RodPedersen.php" title="Rod Pedersen">Rod Pedersen</a></li>
<li><a href="../RobertMimbs.php" title="Robert Mimbs">Robert Mimbs</a></li>
<li><a href="../ScottSchultz.php" title="Scott Schulz">Scott Schultz</a></li>
</ul>
</li>
<li><a href="../CurrentEvents.php" title="Current Events">Current Events</a></li>
<li><a href="#" title="Events Promotion">Events Promotion</a> </li>
<li><a href="#" title="About Us">About Us</a></li>
<li><a href="#" title="Contact Us">Contact Us</a></li>
</ul>
<span class="container"><!-- TemplateBeginEditable name="Main" --><div align="center"><font face="Tahoma, Geneva, sans-serif"><br />
<p><h1>Welcome to EMJ Marketing</p>
</h1>
<h3>
<p>
Are You Looking for an Emcee for Your Event?</p>
<p>
A Speaker for Your Event?</p>
<p>An Autograph Signing?</p>
<p>
Product Endorsement?</p>
<p>
Business Endorsement?</p>
<p>
Motivational Speaker for Your Company and/or Special Project?</p>
<p>
Speaker for Your Trade Show? </p>
<p>
Speaker for Your Fundraiser?</p>
<p>
Event Promotion?</p>
<p>
Event Coordination?</p>
<p>
Then look no further, EMJ Marketing has the right person for the job.</p>
<p>
Click on the navigation bars for further details.</p></h3></font></div>
<!-- TemplateEndEditable --></span>
<!-- end .content --></div>
<div class="footer">
<p><a href="http://www.facebook.com/pages/EMJ-Marketing/154741607902457?v=wall"><img src="../Images/facebook-logo_sm.jpg" alt="imgFB" width="25" height="25" align="left" /></a><a href="http://twitter.com/emjmarketing"><img src="../Images/twitterlogo_sm.jpg" alt="imgtwitter" width="25" height="25" hspace="5" align="left" /></a>© EMJ Marketing</p>
</div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var Accordion1 = new Spry.Widget.Accordion("Accordion1",{useFixedPanelHeights:false,defaul tPanel: -1});
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {invalidValue:"-1"});
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {hint:"yyyy-mm-dd", format:"yyyy-mm-dd"});
</script>
</body>
</html>
<?php
mysql_free_result($rsCurEvents);
?>
=======================
North America
Europe, Middle East and Africa
Asia Pacific