big problem

liunx

Guest
i've got a guestbook script but it didn't validate correctly as xhtml because it had <ENTRIES>. The new <div id="entries"> tag is fine, but the JavaScript needs to be changed, and the script doesn't like the new tag.<br />
<br />
pwease can somebody help me!!!<br />
<br />
thanx<br />
<br />
==========================================<br />
<?xml version="1.0" encoding="iso-8859-1"?><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html><br />
<head><br />
<title>:: Kim's Informatie Center ::</title><br />
</head><br />
<body class="white"><br />
<div class="cntr"><a href=http://www.webdeveloper.com/forum/archive/index.php/"invullen.html" target="newwin" onclick="java script:window.open('', 'newwin', 'toolbar=no,location=no,directories=no,status=no,m<br />
enubar=no,scrollbars=no,resizable=no,width=400,hei<br />
ght=280')">Teken Gastenboek</a> <a href=http://www.webdeveloper.com/forum/archive/index.php/"java script:location.reload()">Herlaad Pagina</a><br />
<script type="text/javascript"><br />
document.write('<form name="gbform">');<br />
</script><br />
<textarea id="entrie" name="entrie" cols="1" rows="1" style="height : 1px; width : 1px; border : 0px none;"><div id="entries">Ey leuke site en handig groetekes +++<br /><br />Toedeloe :clown: :clap: <br /><b>Lana</b> <<a href=http://www.webdeveloper.com/forum/archive/index.php/"mailto:{@">{@</a>> - <a href="213.119.148.4"></a> Wed Apr 21 19:18:48 MEST 2004<br /></div></textarea><br />
<script type="text/javascript"><br />
document.write('<\/form>');<br />
var entries= document.gbform.entrie.value;var entries= entries.substring(entries.indexOf('<div id="entries"')+9);var entriesdone= "";for ( var i=0 ; i<smilies.length ; i++ ) {var entriesdone= (entriesdone != "") ? entriesdone : entries;if (entriesdone.indexOf(smilies[0]) != -1) {var splitted= entriesdone.split(smilies[0]);var entriespart= splitted[0];for ( var y=1 ; y<splitted.length ; y++ ) {entriespart+= '<img src=http://www.webdeveloper.com/forum/archive/index.php/"'+ smilies[1] +'" alt="">'+ splitted[y];}var entriesdone= entriespart;}}var entries= (entriesdone == "") ? entries : entriesdone;document.write(entries);<br />
</script><br />
</div><br />
</body><br />
</html><!--content-->All I can think of is to make sure that you aren't using M$ proprietary elements in the document, or in the scripts. Anything M$ proprietary will not validate.<br />
<br />
Also, just a suggestion, you should use a server side language with your guestbook. The way it is now, only 87% of your users will be able to use it. :)<!--content-->Originally posted by PhillMc <br />
All I can think of is to make sure that you aren't using M$ proprietary elements in the document, or in the scripts. Anything M$ proprietary will not validate.<br />
<br />
Also, just a suggestion, you should use a server side language with your guestbook. The way it is now, only 87% of your users will be able to use it. :) <br />
<br />
There wasn't any MS only code. The guestbook markup was using a tag called <ENTRIES> which isn't valid. They switched the tag to something that would validate, <div id="entries">. The problem is that the JS is looking for the <ENTRIES> tag which isn't there anymore. They are trying to change the JS so it treats the new tag in the same way as it did they old tag.<br />
<br />
While doing it server side is the more ideal way of doing it, it might not be an option using that webhost.<!--content-->thanx spufi ;)<!--content-->
 
Back
Top