Well after hours of trying to figure out my problem, I figured out, but do not understand on how to fix it.
I submit information to the database thru a textarea. If i leave a white space at the end it causes my javascript on the page to show thru on the page where i echo the Description.
Not sure how to fix this issue, but here is part of the page if you can help me out here...
Is there a way in the way I submit the information to the database to prevent this, without me having to worry about removing white space ? Or maybe a way I echo it to prevent it.
<SCRIPT LANGUAGE="JavaScript">
var txt = "Bookmark Us!";
var url = "<? echo $SITE_URL; ?>/Dir/AdManagementprod.php?subcatid=<? echo $myrow["subcatid"]?>";
var who = "<? echo $pname; ?> Listing at <? echo $SITE_NAME; ?>";
var ver = navigator.appName;
var num = parseInt(navigator.appVersion);
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write('<A HREF="javascript:window.external.AddFavorite(url,who);" ');
document.write('onMouseOver=" window.status=');
document.write("txt; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">'+ txt + '</a>');
}else{
txt += " (Ctrl+D)";
document.write(txt);
}
</script>
</b>
<li><a href="<?php echo $SITE_URL;?>/Dir/feedback.php?subcatid=<? echo $subcatid; ?>&subcat=<? echo $subcat;?>"><b>Report
This Link</b></a></li>
</ul>
</font></td>
</tr>
</tbody>
</table>
<br>
<table cellSpacing="1" cellPadding="2" width="100%" border="0">
<tbody>
<tr>
<td><b>Description:</b><BR>
<? echo $myrow["Description"]?></td>
</tr>
</tbody>
</table>