Re: [jQuery] search for id with '/' character

2006-10-08 Thread Mika Tuupola
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 Tuupo

Re: [jQuery] search for id with '/' character

2006-10-07 Thread Su
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 w

Re: [jQuery] search for id with '/' character

2006-10-07 Thread Ⓙⓐⓚⓔ
I wondered the same thing,,, I wouldn't have slashes in my ids... but he is working with others who have disregarded standards... It's nice that JQ can handle messy htmls, instead of just well formed xhtml. I bet xsl would just plotz! On 10/7/06, Su <[EMAIL PROTECTED]> wrote: > I'm curious: Why

Re: [jQuery] search for id with '/' character

2006-10-07 Thread Michael Geary
> From: Su > > 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 ha

Re: [jQuery] search for id with '/' character

2006-10-07 Thread Su
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 i

Re: [jQuery] search for id with '/' character

2006-10-07 Thread Jörn Zaefferer
[EMAIL PROTECTED] schrieb: > var a = $("[EMAIL PROTECTED]'content/mytest']"); > That should be $('[EMAIL PROTECTED]'content/mytest']). #input would select an element with the id input. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery

Re: [jQuery] search for id with '/' character

2006-10-06 Thread Klaus Hartl
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: #foo>bar. -- Klaus ___ jQuery ma

Re: [jQuery] search for id with '/' character

2006-10-06 Thread Matt Grimm
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: >

Re: [jQuery] search for id with '/' character

2006-10-06 Thread Wil Stuckey
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>>> > >

Re: [jQuery] search for id with '/' character

2006-10-06 Thread Matt Grimm
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 > > > > > > > > > > > > How can I get the value for the input text field using jque

Re: [jQuery] search for id with '/' character

2006-10-06 Thread Olivier Percebois-Garve
I guess $('input').attr('id'); [EMAIL PROTECTED] wrote: > Hi, > > if I have a form like > > > > > > > > > > > > How can I get the value for the input text field using jquery? > > I tried > > > > > > > > $(document).ready(function(){ > > var a = $("[EMAIL PROTECTED]'content/mytest']"); > >

[jQuery] search for id with '/' character

2006-10-06 Thread
Hi, if I have a form like How can I get the value for the input text field using jquery? I tried $(document).ready(function(){ var a = $("[EMAIL PROTECTED]'content/mytest']"); alert(a.val()); }); but it does not work. Thanks ___