<br><br><div class="gmail_quote">On Sat, Jun 21, 2008 at 1:10 AM, Mike Wright <<a href="mailto:mike.wright@mailinator.com">mike.wright@mailinator.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mike Wright wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Bassel Safadi wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, Jun 21, 2008 at 12:09 AM, Mike Wright wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Are there any javascript/DOM gurus out there who can tell me why the html page below does not behave as expected?<br>
<br>
Below is the html being tested.<br>
<br>
=====================<br>
<br>
<?xml version='1.0' encoding='UTF-8'?><br>
<!DOCTYPE html<br>
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br>
  "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>" xml:lang="en" lang="en"><br>
<head><title>Javascript DOM Experiments</title></head><br>
<body><br>
<p   id='m'></p><br>
<a   id='a'></a><br>
<script type='text/javascript'><!--//<br>
var d = document;<br>
var m = d.getElementById('m');<br>
var a = d.getElementById('a');<br>
</blockquote></blockquote></blockquote>
<br>
var a = d.getElementById('a').getAttribute('id');<br>
gives me the 'id'.  From there I can create the 'id' of the desired tag, which solves my immediate problem.<br>
<br>
I'm still curious as to why the <a> behaves differently???<br>
</blockquote><div><br>I don't know for sure why it behaves like wise but you can find here:<br><a href="http://www.w3schools.com/HTMLDOM/dom_obj_anchor.asp">http://www.w3schools.com/HTMLDOM/dom_obj_anchor.asp</a><br>
a list of properties you can call by using: <br><br>
var a = d.getElementById('a').Property;<br>or:<br>
var a = d.getElementById('a').getAttribute('Property');<br><br></div></div>