On Oct 3, 5:14 am, VictorM <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to JQuery and I am having problems to traverse a HTML > document. What I want to accomplish is to get an <input> element with > id = h that is inside a <div>. This input element is part of a <FORM> > element. var theInput = document.getElementById('h'); You could also access it as a property of the form element. > So far I have tried the following jqueries without > success: > > 1. - $("form#frmSceneData > > div.frmRowOuter").children("div.frmRowField") > .show().html() > > 2.- $("form#frmSceneData").find ("div.frmRowField") > .show().html() Don't get hung up on complex selectors - they can easily create more problems than they solve. Change the structure of your document and they may well stop working. In this case, someone may decide to layout the page using a table rather than divs, so your selectors based on div go belly up. -- Rob
[jQuery] Re: How can I to traverse a html doc starting at a form element to get an element inside a
- [jQuery] How can I to traverse a html doc starting at a form e... VictorM
- [jQuery] Re: How can I to traverse a html doc starting at... RobG
- [jQuery] Re: How can I to traverse a html doc starting at... ricardobeat
Reply via email to
- [jQuery] How can I to traverse a html doc starting at a form e... VictorM
- [jQuery] Re: How can I to traverse a html doc starting at... RobG
- [jQuery] Re: How can I to traverse a html doc starting at... ricardobeat