This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Tutorial for dynamic links
#81

It's all manual this time.

I have attached the source file.

I'm not sure why the page is cut off. It happened once I added Commentics. It was fine before that.


Attached Files
.php attraction.php Size: 5.45 KB  Downloads: 24
Reply
#82


I'm giving you three guesses...
Reply
#83

No change. Which is really weird. I have no idea why it does not work.
Reply
#84

Try
PHP Code:
<?php
session_start
();
ob_start();
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Things To Do In Provo, The Local Website - Provo Happening</title>
<link rel="stylesheet" href="default.css" type="text/css">
<meta name="robots" content="index,follow">
<meta name="keywords" content="things to do in provo, what is happening in provo, something to to in provo, date ideas provo, events in provo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="comments/css/stylesheet.css"/>
<?php include("includes/access.php"); ?>
<script language="javascript" type="text/javascript">
<!--
var pf=false;var psmi='';var pmmi='';
function newImage(arg){if(document.images){rslt=new Image();rslt.src=arg;return rslt;}}
function cm(ima,mt,ci){var ni=(ci==1)?'_2.':'.';ni='images/'+ima+ni+'gif';if(document.images&&pf){if(!ci){if(!mt){if(ima!=pmmi){ci=1;}}else if(ima!=psmi){ci=1;}};if(ci && document[ima]!=null){document[ima].src=ni;}}}
function ip(){if(document.images){<!--menupr--->
homebutton_2 = newImage("images/homebutton_2.gif");
aebutton_2 = newImage("images/aebutton_2.gif");
eventbutton_2 = newImage("images/eventbutton_2.gif");
restaurantbutton_2 = newImage("images/restaurantbutton_2.gif");
blogbutton_2 = newImage("images/blogbutton_2.gif");
contactbutton_2 = newImage("images/contactbutton_2.gif");
slcbutton_2 = newImage("images/slcbutton_2.gif");
pf=true;};cm('',0,1);}
if(window.addEventListener){window.addEventListener("load",ip,false)} else if(window.attachEvent){window.attachEvent("onload",ip)} else if(document.getElementById) window.onload=ip;
//-->
</script>
<script type="text/javascript" src="includes/scripts.js"></script>
<script type="text/javascript" src="includes/attraction.js"></script>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAImUkbz6rBbFYz5Ucdf5ZShQg9ylcGu56rAnH6r2zRrmzm4ZVHhS5mETHL6ZaPGuyR8CmSQu6UlNfhA" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function GMload() {
if (GBrowserIsCompatible())
{
var map=new GMap2(document.getElementById("map"));
geocoder=new GClientGeocoder();
geocoder.getLatLng('<?php if (isset( $_GET["attraction"] ))
{
$attraction = $_GET ["attraction"];
$wattraction = " id=" . "'". $attraction ."'";
}
//connect to db
mysql_select_db("provoha1_attract",$con);

$result = mysql_query("SELECT * FROM attractions WHERE $wattraction");

while(
$row = mysql_fetch_array($result)){
echo
$row['Address'] . ', ' . $row['City'] . ', UT ' . $row['Zipcode'];
mysql_close ($con);} ?>',function(point){if(point){map.setCenter(point,14);map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());var marker1=new GMarker(point);map.addOverlay(marker1);}})
<!--addnew-->
} }
//]]>
</script>
</head>

<body onload="GMload();" onunload="GUnload();">
<div id="container">
<div id="top">
<div id="banner">
<a href="index.php"><img src="images/attractions_and_entertainment.jpg" alt="Banner for Attractions and Entertainment in Provo"></a>
</div>
<div id="mmenu">
<?php include("includes/mainmenu.html"); ?>
</div>
</div>
<div id="main">
<div id="side">
</div>
<div id="content">
<?php include("includes/access.php"); ?>
<?php if (isset( $_GET["attraction"] ))
{
$attraction = $_GET ["attraction"];
$wattraction = " id=" . "'". $attraction ."'";
}
//connect to db
mysql_select_db("provoha1_attract",$con);

$result = mysql_query("SELECT * FROM attractions WHERE $wattraction");

$row = mysql_fetch_array($result);

echo
'
<div id="attractiontable">
<div style="background: #e6ece6; height: 60 px; width: 50 px; float: right; position: relative; margin: 5px auto; overflow:hidden;">
</div>
<div style="background:#e6ece6; position: relative; float: left; width: 550px; overflow:hidden; padding: 10px;">
<div style="background:#e6ece6; position:relative; margin: 0px; padding: 0px; overflow:hidden;">'
;
echo
'<strong>';
echo
$row['Name'];
echo
'</strong>';
echo
'<br>Type: ';
echo
$row['Type'];
echo
'<br>Location: ';
echo
$row['Address'] . ', ' . $row['City'] . ', UT ' . $row['Zipcode'];
echo
'
</div>
</div>
<div style="width:630px; position: relative; margin: auto; overflow:hidden;">
Map
<div style="width:450px;height:300px; margin:auto; border: 1px;" id="map"></div> '
;
$page_id = $_GET['attraction'];
$path_to_comments_folder = "../comments/";
define ('IN_COMMENTICS', 'true'); //no need to edit this line
require $path_to_comments_folder . "includes/commentics.php"; //no need to edit this line
echo '
</div>
</div>
<br />'
;
mysql_close ($con);
?>
<div id="footer">
<?php include("includes/footer.html"); ?>
</div>
</div>
</div>
</div>
</body>
</html>

I made a few changes, which aren't significant (extra whitespace). If that fails, try removing the top part in the php tags (I have a page working without it somehow?).

At least we know it works (zoom out).
Another possibility is that the file has a BOM (byte order mark). If you use Notepad++, this can be easily fixed by going to "encoding -> convert to UTF-8 without BOM" or something like that, unless you want a different encoding.
Apparently, Dreamweaver does set a BOM. Remove it, and it should work.

I'm giving you three guesses...
Reply
#85

Cool. Removing the BOM did the trick. Thanks!
Reply
#86

Awesome! Glad I could help Smile

Your stylesheet isn't loaded because it is up one directory. Try something like:
Code:
<link rel="stylesheet" type="text/css" href="../comments/css/stylesheet.css" />
Where "../" goes up one directory.

I'm giving you three guesses...
Reply
#87

Ah. Thanks for that!
Reply
#88

Note that there should be an option to turn off the BOM in Dreamweaver. I'm not familiar with it, so I don't know where. The other script that you were using possibly had the same problem. If you don't find the option, then you'll have to remove the BOM yourself.

Don't forget to check out the other stuff we've been working on around here. I've made a couple of stylesheets, and we are currently working on the reply feature, along with other changes.

If you run into any other problems, I'm ready Big Grin

I'm giving you three guesses...
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by J.B.
06-Jun-2014, 11:19 PM
Last Post by het
19-Sep-2011, 06:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)