Rambo Tribble 0 Newbie Poster

Ah, yes, the love which dare not speak its name. It's probably all due to a repressed attraction to penguins; it is important to remember the genus Spheniscus, also known as the "jackass penguin", for which Mr. Ballmer might be expected to hold a particular affinity.

Rambo Tribble 0 Newbie Poster

I recently read that the W3C is, in fact, recommending HTML 4.01 for current web pages. XHTML, it is said, is still considered "under development". Just so you know.

Rambo Tribble 0 Newbie Poster

A thought occurs, if you want to have the tags appear as lowercase text within a dynamically generated element, you can take the text string generated by the browser and use a regular expression to find the text within <>, but not within "", and convert it to lowercase before sending the converted string to the alert. The alert should treat the string as inviolable.

Rambo Tribble 0 Newbie Poster

Give this a try in different browsers; you'll see what I mean. Opera and FF do the same thing as IE, Konqueror, (and, presumably, Safari), preserves the case of the tag itself:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>test</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
window.onload=function(){
alert(document.getElementById("bod").tagName);
}
</script>
</head>
<body id="bod">
</body>
</html>

I suspect this is a remnant of earlier implementations that the browser vendors just haven't felt was necessary to address. This is, after all, an internal reference.

Rambo Tribble 0 Newbie Poster

There's no reason you can't change "TEXTAREA" to "textarea" in the code. IE will still report the tag in upper case, however, if queried. Note that if you use a transitional DOCTYPE the case shouldn't be an issue for validation.

Rambo Tribble 0 Newbie Poster

The onload event is more appropriately applied to the window and is deprecated on the body. You may assign code to the event with the syntax window.onload=

Rambo Tribble 0 Newbie Poster

The W3C-approved method of appending an element uses the createElement and appendChild methods. The innerHTML method is actually IE-specific, though other browsers have adopted it for compatibility with web sites using it. It is convenient, but as you found, more a kludge than a properly designed solution. Here is a quick sample of using the techniques:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
td{height:20px;width:40px;border:4px solid #daa;}
</style>
<script type="text/javascript">
function addRow(){
  var nw_td=document.createElement('td');
  var nw_txt=document.createTextNode("cell");
  nw_td.appendChild(nw_txt);
  var nw_tr=document.createElement('tr');
  nw_tr.appendChild(nw_td);
  document.getElementById('tbodOne').appendChild(nw_tr);
}
</script>
</head>
<body>
<table>
<tbody id="tbodOne">
<tr>
  <td>&nbsp;</td>
</tr>
</tbody>
</table>
<a href="#" onclick="addRow();return false;">add row</a>
</body>
</html>
Rambo Tribble 0 Newbie Poster

Search engine ranking probably isn't the first thing to be worried about on pages that require JavaScript. Whether or not you should be concerned depends on what your pages are intended to accomplish, their audience and what the indicated JavaScript does.

Estimates of the number of users running with JS disabled range from 10% to 25%. That can be a significant number for a commercial site, so you may end up turning business away if you require JS for functionality. There are also issues with accessibility, as JS can interfere with screen readers and other adaptive technologies.

With the advent of "Web 2.0", more sites are requiring JS to deliver core functionality in their pages. The trade-off is a reduced audience for a slicker presentation. You must decide which bests serves your purposes.

In terms of search engine ranking, I doubt you have much to be concerned about. In terms of site usability, well, that depends.