div tag attribute corrupts page

I can't figure out why, but when I add an attribute to the <div> tag below, it corrupts the html and the page does not render properly. Any suggestions anyone?
Paul
DAT
index byte "HTTP/1.1 200 OK", CR, LF, {
} "Content-Type: text/html", CR, LF, CR, LF, {
} "<HTML>", {
} "<HEAD>", {
} "<TITLE>Willoughby Farm</TITLE>", {
} "</HEAD>", {
} "<SCRIPT LANGUAGE='JavaScript'>",CR,{
} "Temp3 = 60",CR, {
} "function Counter() {",CR, {
} " Temp3 = Temp3 - 1;",CR, {
} " document.frm1.seconds.value=Temp3;",CR,{
} " timerID = setTimeout('Counter()',1000);",CR,{
} " timedRefresh()",CR, {
} " }",CR, {
} "</SCRIPT>",CR, {
} "<SCRIPT LANGUAGE='JavaScript'>",CR,{
} "function timedRefresh() {",CR,{
} " setTimeout('location.reload(true);',60000);",CR,{
} " }",CR, {
} "</SCRIPT>"
byte "<BODY Onload='Counter()'>"
byte "<center>"
byte "<FONT FACE=BOOKMAN OLD STYLE SIZE=8><BR>"
byte "Doc's Flock<BR></FONT>"
byte "<FONT FACE=BOOKMAN OLD STYLE SIZE=4><BR>"
byte "Coop Status Page "
byte "(...a work in progress!)</FONT>"
byte "<BR><img src=http://www.tegacayanimalhospital.com/images/spinneret/coop.jpg><BR>"
byte "<div>"
byte "<FONT FACE=BOOKMAN OLD STYLE SIZE=2>Coop Date and Time: "
time1 byte "00/" '<--- This is a place holder ; number is dynamically updated
time2 byte "00/20" '<--- This is a place holder ; number is dynamically updated
time3 byte " "'<--- This is a place holder ; number is dynamically updated
time4 byte " :" '<--- This is a place holder ; number is dynamically updated
time5 byte " :" '<--- This is a place holder ; number is dynamically updated
time6 byte " <BR>" '<--- This is a place holder ; number is dynamically updated
byte "</FONT>"
byte "<BR><B><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Conditions inside Coop:</FONT></B> "
byte "<table><tr><td>" 'wrapper table
byte "<table border='1'>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Temp:</td> "
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
temp byte " °F "'<--- This is a place holder ; number is dynamically updated
byte "</FONT></FONT></td></tr>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Humidity: </td> "
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
humi byte " % "'<--- This is a place holder ; number is dynamically updated
byte "</FONT></FONT></td></tr></table></td>"
byte "<td><table border='1'>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Current Light:</td> "
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
num1 byte "0000 " '<--- This is a place holder ; number is dynamically updated
byte "</FONT></FONT></td></tr>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Average Light:</td> "
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
num2 byte "0000 "'<--- This is a place holder ; number is dynamically updated
byte "</FONT></FONT></td></tr></table></td>"
byte "<td><table border='1'>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Door Position</td>"
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
str1 byte " "'<--- This is a place holder ; val is dynamically updated
byte "</FONT></FONT></td></tr>"
byte "<tr><td><FONT FACE=BOOKMAN OLD STYLE SIZE=4>Switch Position</td>"
byte "<td><FONT FACE=BOOKMAN OLD STYLE SIZE=4 COLOR=RED>"
str2 byte " " '<--- This is a place holder ; val is dynamically updated
byte "</FONT></FONT></td></tr></table>"
byte "</td></tr></table>"
byte "</div>"
byte "<FONT FACE=BOOKMAN OLD STYLE SIZE=2><BR>"
byte "<FORM NAME='frm1'>"
byte "Seconds Until Refresh ="
byte "<INPUT NAME='seconds' SIZE=4 VALUE=''>"
byte "</FORM>"
byte "</FONT>"
byte "</FONT>"
byte "</center>"
byte "</BODY>"
byte "</HTML>"
byte 0
buff byte $0[BUFFER_2K]
resPtr long $0[25]
null long $00
dhcpLease long $ff_ff_ff
dns_addr byte $61, $0A, $0B, $01
Paul
Comments
-Phil
This is what chrome displays on Mac OSX 10.8
</FONT></FONT></center></BODY></HTML>tml <HTML><HEAD><TITLE>Willoughby Farm</TITLE></HEAD><SCRIPT LANGUAGE='JavaScript'> Temp3 = 60 function Counter() { Temp3 = Temp3 - 1; document.frm1.seconds.value=Temp3; timerID = setTimeout('Counter()',1000); timedRefresh() } </SCRIPT> <SCRIPT LANGUAGE='JavaScript'> function timedRefresh() { setTimeout('location.reload(true);',60000); } </SCRIPT><BODY Onload='Counter()'><center><FONT FACE='BOOKMAN OLD STYLE' SIZE=8><BR>Doc's Flock<BR></FONT><FONT FACE='BOOKMAN OLD STYLE' SIZE=4><BR>Coop Status Page (...a work in progress!)</FONT><BR><img src=http://www.tegacayanimalhospital.com/images/spinneret/coop.jpg><BR><div id='content'><FONT FACE='BOOKMAN OLD STYLE' SIZE=2>Coop Date and Time: 01/29/2013 19:59:12<BR></FONT><BR><B><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Conditions inside Coop:</FONT></B> <table><tr><td><table border='1'><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Temp:</td> <td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED>32.00 °F </FONT></FONT></td></tr><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Humidity: </td> <td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED> 0.00 % </FONT></FONT></td></tr></table></td><td><table border='1'><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Current Light:</td> <td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED> 0330</FONT></FONT></td></tr><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Average Light:</td> <td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED> 0490</FONT></FONT></td></tr></table></td><td><table border='1'><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Door Position</td><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED>CLOSED</FONT></FONT></td></tr><tr><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4>Switch Position</td><td><FONT FACE='BOOKMAN OLD STYLE' SIZE=4 COLOR=RED>OPEN </FONT></FONT></td></tr></table></td></tr></table></div><FONT FACE='BOOKMAN OLD STYLE' SIZE=2><BR><FORM NAME='frm1'>Seconds Until Refresh =<INPUT NAME='seconds' SIZE=4 VALUE=''></FORM></FONT></FONT></center></BODY></HTML>
<div name='content'>
and replace it with<div>
The page loads properly. I'm not sure I understand.EDIT: It actually perpetuates the problem. If I now remove the div tag all together, which has resolved the problem before, the page doesn't display. I removed all the quotes from the face attributes and it works as expected.
Now I'm really confused.
EDIT: or not.
Keep up the good work, doggiedoc! Your patients (and their humans) need you!
-Phil
Good Night.
DAT buff byte $0[BUFFER_2K+1]
Otherwise, I'll fix it when I get home from work.
Thanks!
Like Mike said in another thread: use the spinneret xml service :put your coop sensor data etc; in an xml, and parse the xml in another website.
btw Doc, nice project
Thanks!
PUB MultiSocketServer | bytesToRead, page, sockId, bytesSent, ptr, i, fs, bytes bytesToRead := bytesSent := sockId := i := 0 repeat bytesToRead~ CloseWait repeat until sock[sockId].Connected sockId := ++sockId // SOCKETS 'Data in the buffer? repeat until bytesToRead := sock[sockId].Available 'Check for a timeout error if(bytesToRead =< 0) pst.str(string(CR, "Timeout: ")) pst.dec(bytesToRead) if(i++ == 1) sock[sockId].Disconnect i := 0 next 'Get the Rx buffer sock[sockId].Receive(@buff, bytesToRead) 'Display the request header 'pst.str(@buff) page := ParseResource(@buff) pst.str(string("Byte to send....")) pst.dec(strsize(page)) pst.char(CR) mtuBuff := sock[sockId].GetMtu fs := strsize(page) ptr := page repeat until fs =< 0 if(fs < mtuBuff) bytes := fs else bytes := mtuBuff fs -= sock[sockId].Send(ptr, bytes) ptr := page + bytes sock[sockId].Disconnect sock[sockId].SetSocketIR($FF) sockId := ++sockId // SOCKETS