That's odd, I copied your snippet exactly as shown, and reproduced the
error. Then i escaped it as you mentioned and it works perfectly (this,
changed the text next to the input to say "my:txtPhone")
$("input[xd\\:binding = 'my:txtPhone']")
On Wed, Dec 16, 2009 at 5:39 AM, Ravindra <[email protected]> wrote:
> Hi,
>
> when I give attribute name as “xd:binding”, I gets error as “Error:
> uncaught exception: Syntax error, unrecognized expression:
> [xd:binding='my:txtPhone']”.
>
> I also tried escaping – [xd\\:binding=’my:txtPhone’], JavaScript error
> is not coming in this case but unable to select attribute.
>
> Please refer below html file.
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <script src="http://code.jquery.com/jquery-latest.js"></script>
>
> <script>
> $(document).ready(function(){
> //$("input[name='newsletter']").next().text(" is newsletter");
> $("input[xd:binding = 'my:txtPhone']").next().text("my:txtPhone");
> //
> gives javascript error
> });
> </script>
>
> </head>
> <body>
> <div>
> <input type="text" name="newsletter"/>
> <span>name?</span>
> </div>
> <div>
> <input id="x17" class="xdTextBox" hideFocus="1" title=""
> tabIndex="0" xd:CtrlId="CTRL3" xd:xctname="PlainText"
> xd:binding="my:txtPhone" name="_ctl30" type="text" id="_ctl30"
> style="WIDTH: 130px;" />
> <span>name?</span>
> </div>
> </body>
> </html>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "jQuery Development" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jquery-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-dev?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en.