On Oct 7, 2006, at 21:32, Michael Geary wrote:
Good call. For anyone who is wondering what is valid in an ID:
http://www.w3.org/TR/html4/types.html#type-name
Also one older document regarding the same matter:
http://devedge-temp.mozilla.org/viewsource/2001/css-underscores/
--
Mika Tuupola
I'm curious: Why is everybody trying to fix the selector problem,
rather than pointing out the ID is invalid in the first place?
Dexter: Get rid of the slash altogether. Problem solved.
You might be able to work around this with the various suggestions
others have made, but if your document
Ah. Blame someone else. I see *grin*
It /is/ convenient that jQ can deal with this; I just found it strange
no one had at least pointed it out. Workarounds are nice, but the *real*
problem is that the HTML is just wrong, and that should be addressed
first, if at all possible.
Ⓙⓐⓚⓔ wrote:
I
Hi,
if I have a form like
form
input type=text value=test id=content/mytest/
/form
How can I get the value for the input text field using jquery?
I tried
script type=text/javascript
$(document).ready(function(){
var a = $([EMAIL PROTECTED]'content/mytest']);
alert(a.val());
I guess $('input').attr('id');
[EMAIL PROTECTED] wrote:
Hi,
if I have a form like
form
input type=text value=test id=content/mytest/
/form
How can I get the value for the input text field using jquery?
I tried
script type=text/javascript
$(document).ready(function(){
Your problem is that you prefixed the input selector with #. This
works:
$('[EMAIL PROTECTED]/bar]').val();
On Fri, 2006-10-06 at 15:00 -0400, [EMAIL PROTECTED] wrote:
Hi,
if I have a form like
form
input type=text value=test id=content/mytest/
/form
How can I get the
couldn't you just do:$('#foo/bar').val();?-wilOn 10/6/06, Matt Grimm [EMAIL PROTECTED] wrote:
Your problem is that you prefixed the input selector with #. Thisworks:
$('[EMAIL PROTECTED]/bar]').val();On Fri, 2006-10-06 at 15:00 -0400, [EMAIL PROTECTED] wrote: Hi, if I have a form like
form input
No, that doesn't work, and I'm assuming it has something to do with the
forward slash being an XPath selector.
m.
On Fri, 2006-10-06 at 17:21 -0400, Wil Stuckey wrote:
couldn't you just do:
$('#foo/bar').val();
?
-wil
On 10/6/06, Matt Grimm [EMAIL PROTECTED] wrote:
Your
Wil Stuckey schrieb:
couldn't you just do:
$('#foo/bar').val();
No, the slash is an XPath selector. That expression translates to All
items named bar which are a direct child of #foo, or as a CSS selector:
#foobar.
-- Klaus
___
jQuery mailing