I have this simple markup:
componentDom.innerHTML =
<form action=""> <h1 name="formTitle"></h1>
<p name="formInstructions"></p>
<div name="top">
</div>
<div name="formContent">
<divname="column"><div ></div></div>
</div>
<div name="bottom">
<input type="submit" name="defaultButton" value="Submit"/>
</div>
</form>
<p name="formInstructions"></p>
<div name="top">
</div>
<div name="formContent">
<divname="column"><div ></div></div>
</div>
<div name="bottom">
<input type="submit" name="defaultButton" value="Submit"/>
</div>
</form>
I'm executing this xpath calls with the following results:
$('form/[EMAIL PROTECTED]', componentDom).length = 3
$('form/[EMAIL PROTECTED]', componentDom)[0].innerHTML = ""
$('form/[EMAIL PROTECTED]', componentDom)[1].innerHTML = "<DIV name=\"column\">
<DIV></DIV></DIV>"
$('form/[EMAIL PROTECTED]', componentDom)[2].innerHTML "<INPUT type=submit value=Submit name=defaultButton> "
$('form/[EMAIL PROTECTED]/input', componentDom) Object required Error
$('//div', componentDom) 'undefined' is null or not an object Error
$('form//div', componentDom).length = 6
$('form//div/input', componentDom).length = Object required Error
I don't understand why it's failing! I'm just asking for the input which it's obviously there, under the last DIV. Like this, I've come across many really simple XPath queries that just don't work. Am I doing something wrong? Is it XPath actually supported?
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
