Using Javascript/jQuery to access HTML elements with improper id attribute?

You can escape the spaces and parentheses using backslashes: $('#property\\(Phone\\)'). Val('jQuery selected property(Phone)! '); $('#ab\\ cd\\ ef').

Val('jQuery selected ab cd ef! ').

You can escape the brackets like this: $("#property\\(Phone\\)").

You beat me by a minute, but you forgot the '#' at the start of your selector. :) – Annabelle Jan 7 '10 at 18:28 fixed it, thanks! – Chetan Sastry Jan 7 '10 at 18:30.

You could always do a document. GetElementsByTagName('input'), then browse the results and match it with it's attributes (like it's type and name, class...). Not very efficient but the only way I know that will work with any order (since the id is invalid)... var inputs = document.

GetElementsByTagName('input'); if (inputs) for (var I = 0; I Name == 'SearchValue') return inputsi; I'm pretty sure JQuery (or any other good framework) have an equivalent to this snippet...

Firefox, I assume, since you mention GreaseMonkey. But document. GetElementById("property(Phone)") seems to work just fine in Firefox 3.5.

JQuery probably can't find it using #id syntax, but could probably find it using tagNameid=value syntax... try it, and good luck. See the jQuery doc.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions