birdbrain

msg:4514397 | 9:59 pm on Oct 31, 2012 (gmt 0) |
Hi there alleria21, try it like this... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>The American Eggplant Society</title>
<script type="text/javascript"> function init(){ document.getElementById('last-modified').firstChild.nodeValue=document.lastModified; } window.addEventListener? window.addEventListener('load',init,false): window.attachEvent('onload',init); </script>
</head> <body>
<h1>The American Eggplant Society</h1> <p> Welcome to our site. Unfortunately, it is still under construction. </p><p> We last worked on it on this date: <span id="last-modified"> </span> </p>
</body> </html>
|
| birdbrain
|
alleria21

msg:4514403 | 10:23 pm on Oct 31, 2012 (gmt 0) |
Thanks birdbrain! works like a charm :P cant imagine what went wrong with previous code though :/ and the one i posted earlier with the CSS im thinking it might be an issue with windows version or bit system maybe :P
|
birdbrain

msg:4514417 | 11:12 pm on Oct 31, 2012 (gmt 0) |
No problem, you're very welcome. ;) birdbrain
|
Fotiman

msg:4514484 | 2:59 am on Nov 1, 2012 (gmt 0) |
document.write does not work with XHTML. The bigger question you might want to ask yourself is should I be using XHTML? For 99% of developers, the answer is no. See this old thread: [webmasterworld.com...]
|
alleria21

msg:4514670 | 2:11 pm on Nov 1, 2012 (gmt 0) |
hmm it seems that xhtml has compatibility problems ... Well then is it ok if i stick to HTML 4.01 Strict cuz im a little afraid of what are the advantages/disadvantages of doing so .but if todays developers use HTML 4.01 (at least till HTML 5 takes on) then it is ok :P
|
phranque

msg:4514676 | 2:18 pm on Nov 1, 2012 (gmt 0) |
i would suggest using the HTML5 DTD and HTML 4.01 compatible markup.
|
Fotiman

msg:4514696 | 2:49 pm on Nov 1, 2012 (gmt 0) |
Yeah, use an HTML 5 DOCTYPE, even if you don't use any of the new HTML 5 features. HTML 5 is a superset of HTML 4.01, so any valid HTML 4.01 document can use an HTML 5 doctype. Also, the HTML 5 DOCTYPE is so much easier to remember. :) <!DOCTYPE html>
|
Fotiman

msg:4514699 | 2:54 pm on Nov 1, 2012 (gmt 0) |
Also, avoid using document.write, as it's generally considered bad practice to use it. Instead, use DOM methods to modify values and/or insert new content. birdbrain's example above uses the nodeValue to change the value of an existing node. Other options could include creating a new node and using appendChild or replaceChild to add it to the document.
|
alleria21

msg:4514734 | 5:08 pm on Nov 1, 2012 (gmt 0) |
:D Okay from now on i forget about xhtml :Pp thanks so much guys!
|
|