Unfortunately, the HTML is generated by a 3rd party application and I have no control over the id's (and in many cases the lack thereof).
On Feb 10, 1:34 pm, mkmanning <michaell...@gmail.com> wrote: > You might save yourself a world of pain if you use standards-based id > attributes: > > HTML 4 spec section 6.2 says, "ID and NAME tokens must begin with a > letter ([A-Za-z]) and may be followed by any number of letters, digits > ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods > (".")." > > XHTML spec section C.8 says, "Note that the collection of legal values > in XML 1.0 Section 2.3, production 5 is much larger than that > permitted to be used in the ID and NAME types defined in HTML 4. When > defining fragment identifiers to be backward-compatible, only strings > matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be used. See > Section 6.2 of [HTML4] for more information." > > On Feb 10, 11:06 am, James <james.gp....@gmail.com> wrote: > > > > > Oh yeah, if you want to put text in a textarea, you're suppose to use > > val() instead of text(): > > > $("#\\#SAM1").val("hello"); > > > On Feb 10, 9:04 am, James <james.gp....@gmail.com> wrote: > > > > Try double backslash escaping the second #-sign: > > > > $("#\\#SAM1").text("hello"); > > > > On Feb 10, 7:36 am, Shredder36 <shredde...@gmail.com> wrote: > > > > > Hello, > > > > > How do I find an element who's id starts with #? > > > > > For example: <textarea id="#SAM1"></textarea> > > > > > the following does not seem to work > > > > > $("##SAM1").text("hello"); > > > > > Any help is greatly appreciated. thank you, > > > > > Sam- Hide quoted text - > > - Show quoted text -