Hello hi-liter,
that does'nt work too.when i move the mouse on "contact the person", I notice in the bottom Javascript:onclick="openwindow(
So, it does'nt recognize my file name either and i still see the error??
Is this becuase i also use my another javascript code in the same program.
Thanks once again
This is my page how it looks like:
<html>
<head>
<link REL=stylesheet href="mystyle.css" TYPE="text/css">
<script type="text/javascript">
function open_phone_number_window(number)
{
window_html_code = "<html>";
window_html_code += "<head><title>Phone number</title></head>";
window_html_code += "<body>";
window_html_code += "<table width=\"100%\" height=\"100%\">";
window_html_code += "<tr><td valign=\"middle\" align=\"center\">";
window_html_code += number;
window_html_code += "<br>";
window_html_code += "<a href=\"javascript:window.close();\">close window</a>";
window_html_code += "</td></tr></table>";
window_html_code += "</body>";
window_html_code += "</html>";
win = window.open("","win","top=100,left=200,width=225,height=100");
win.document.write(window_html_code);
}
</script>
<script type="text/javascript">
function openWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
if(window.screen)if(isCenter)if(isCenter=="true"){
var myLeft = (screen.width-myWidth)/2;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
</script>
</head>
<body bgcolor="#FFFFCC">
<?php
// Lets create MySQL connection
// Lets select the database
// Lets select the record fields from our database table and check for results
$query="SELECT introtext,zipcode,image,telephone,description FROM tbl_personals ORDER BY id";
$numresults=mysql_query($query,$connection);
$numrows=mysql_num_rows($numresults);
// get results
$result = mysql_query($query) or die("Couldn't execute query");
// We carry out the table population using a 'while' loop
while ($row=mysql_fetch_array($result))
{
$var_1=$row["introtext"];
$var_2=$row["zipcode"];
$var_3=$row["image"];
$var_4=$row["telephone"];
$var_6=$row["description"];
// Display the results
echo"
<table width='80%'>";
echo"<tr>";
echo"<td width='100%' colspan='2'><b>$var_1 </b>";
echo ($date);
echo"</td>
</tr>";
echo"<tr>
<td width='50%'>Zip Code:$var_2</td>
<td width='50%' rowspan='4' bordercolorlight='#C0C0C0' bordercolordark='#C0C0C0'>$var_6</td>
</tr>";
echo"<tr>
<td width='50%'><img src='$var_3'></td>
</tr>";
echo"<tr>";
echo"<td width='50%'>";
echo "<a href='javascript:";
echo "open_phone_number_window(".$row['telephone'].");'>Telephone number</a>";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td width='50%'>";
echo"<a href='javascript:";
echo("onClick=\"openWindow('contactform.html','target=_blank','','toolbar=no,status=no','7
24','470','true')\">Contact the Person</a>");
echo"</tr>";
echo"</table>
 ";
}
//We close the MySQL connection
mysql_close($connection);
?>
</TABLE>
</body>
</html>