Hi,
I'm having trouble getting xpath selectors to work well, particularly
on XML responses from ajax requests, using FF. Hoping somebody can
help. Here are the steps I'm taking:
1. Perform an ajax request using Prototype's Ajax.request, with an
onComplete callback to my function. Here's
Thanks a bunch for that link, Brian. I really did search the documentation,
and I feel crazy for missing that rather obvious link from the XPath
section.
I ended up going the less-than-elegant route and breaking out of jQuery to
use the JS match() function, but it works nicely:
if (locat
Darius,
$= means "attribute ends with". Check out
http://jquery.com/docs/Base/Expression/CSS/ , the "Supported, but
different" section.
Taking a close look at the selection documentation might also help you
with item #2 a bit.
You're going to have to figure out how to text-match your relative U
So I have a tabbed navigation system, and I am using jquery to
auto-select the current tab.
Here's the html:
/services/ SERVICES
/store/ STORE
/about-us/ ABOUT US
/gallery/ GALLERY
/press/ PRESS
Here's my jQuery code (adapted from
http://leftlogic.com/info/articles?id=1):
> I have revision 442, but there are still severe problems in IE6. There
> is an error on first page load, the second attr(String, Object) test
> fails completely, find dies at test #34. Third $.load and third $.ajax
> tests die, too. I'll try to get that MS Script Debugger, but until then,
> I hav
John Resig schrieb:
> Jörn -
>
>
>> #164 is not yet resolved, see my latest comment there.
>> http://jquery.com/dev/bugs/bug/164/
>> IE reacts really weird when using getAttribute on an XML element. Looks
>> like we need some more workarounds.
>>
>
> That code has already been changed in SV
John Resig wrote:
>> Just grabbed svn and $(document).ready(function(){alert("hello")}); does
>> not fire on IE.
>
> Sorry about that, it's now fixed in SVN rev 442.
NP, thanks for the updates.
OK, this is good in FF, in IE6 no errors, but returns a '' for the xpath
queries instead of the corre
> Just grabbed svn and $(document).ready(function(){alert("hello")}); does
> not fire on IE.
Sorry about that, it's now fixed in SVN rev 442.
--John
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
John Resig wrote:
> Jörn -
>
>> #164 is not yet resolved, see my latest comment there.
>> http://jquery.com/dev/bugs/bug/164/
>> IE reacts really weird when using getAttribute on an XML element. Looks
>> like we need some more workarounds.
>
> That code has already been changed in SVN. Please mak
Jörn -
> #164 is not yet resolved, see my latest comment there.
> http://jquery.com/dev/bugs/bug/164/
> IE reacts really weird when using getAttribute on an XML element. Looks
> like we need some more workarounds.
That code has already been changed in SVN. Please make sure that
you're current. I
Jörn Zaefferer schrieb:
> Stephen Woodbridge schrieb:
>> John,
>>
>> Thank you for looking at this. Removing the '//' helps a little. Now
>> both the alerts work in FF, and in IE6 it no longer throws an error, but
>> both of the searches in IE6 appear to return a null string (ie: '')
>>
>> Also
Stephen Woodbridge schrieb:
> John,
>
> Thank you for looking at this. Removing the '//' helps a little. Now
> both the alerts work in FF, and in IE6 it no longer throws an error, but
> both of the searches in IE6 appear to return a null string (ie: '')
>
> Also changing the first alert to:
>
> a
John,
Thank you for looking at this. Removing the '//' helps a little. Now
both the alerts work in FF, and in IE6 it no longer throws an error, but
both of the searches in IE6 appear to return a null string (ie: '')
Also changing the first alert to:
alert("'" +
$('/html/body/xml/[EMAIL PROTEC
Stephen -
After doing some testing, it seems as if the culprit is the '//' that
you have in front of your expression. It's perfectly ok to remove it -
as it will continue to work correctly.
It seems to be that if you do .find("//foo") or $("//foo", context) it
freaks out. But this is ok, since do
Hi all,
I am trying to figure out xpath queries, but I am missing something
and/or running into bugs. John pointed me at Bug #164, which has been
closed, but I still have problems. Here is a simple script with two
alerts. Each alert should report "United States" from the embedded xml.
o The 1s
I sent an email yesterday, but maybe it didn't got through.
Anyway, this is it:
I have this simple markup:
componentDom.innerHTML =
I'm executing this xpath calls with the following results:
$('form/[EMAIL PROTECTED]', componentDom).length = 3
$('form/[EMA
Raziel Alvarez schrieb:
> I've been testing and I see many really simple XPath queries that just
> don't work, or they even break.
>
> Is this broken in jQuery? Are they working for somebody?
jQuery does not claim to implement the XPath standard. It just supports
a small subset, and these shoul
I've been testing and I see many really simple XPath queries that just don't work, or they even break.
Is this broken in jQuery? Are they working for somebody?
thanks
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I'm interested to know how to extend the selector syntax to accept things
like axis definitions etc. (I know from the forum that we should be using
the .parents() methods etc but I'd like to extend the selector syntax
myself.)
While the .parent() and .children() methods etc work very well when co
> Sorry, I got this wrong - it doesn't force case sensitive.
>
> According to the docs:
> 2 - Returns the value exactly as it was set in script or in the source
> document.
>
> Now I'm even more confused, what else would it return?
Specifically, this relates to the 'href' attribute - since browser
Mark Gibson wrote:
> John Resig wrote:
>>> Just a hunch, but IE's DOM support isn't native Javascript. If they got
>>> their typelib wrong it may be trying to call getAttribute rather than check
>>> elem for a getAttribute property. Can you replace that last line with this
>>> and see if it works?
John Resig wrote:
>> Just a hunch, but IE's DOM support isn't native Javascript. If they got
>> their typelib wrong it may be trying to call getAttribute rather than check
>> elem for a getAttribute property. Can you replace that last line with this
>> and see if it works?
>>
>> } else if (
> Just a hunch, but IE's DOM support isn't native Javascript. If they got
> their typelib wrong it may be trying to call getAttribute rather than check
> elem for a getAttribute property. Can you replace that last line with this
> and see if it works?
>
> } else if ( typeof(elem.getAttribut
> IE just throws a wobbly:
>
> Line: 639
> Error: Wrong number of arguments or invalid property assignment
>
> which appears to reside in the 'attr' function, the line is:
>
> } else if ( elem.getAttribute ) {
Just a hunch, but IE's DOM support isn't native Javascript. If they g
Mark
Yes - I flagged this up a few days ago
http://www.nabble.com/Searching-for-XML-attribute-tf2215205.html Link Here
Still waiting for resolution - don't know if I need to raise a bug report...
Ian
Mark Gibson-8 wrote:
>
> Hello,
> I've come across a strange bug in IE:
>
> I've loaded an
Hello,
I've come across a strange bug in IE:
I've loaded an XML doc using $.get(), and
selecting nodes using an XPath with a predicate
containing an attribute: $("[EMAIL PROTECTED]", xml)
IE just throws a wobbly:
Line: 639
Error: Wrong number of arguments or invalid property assignment
w
> Can I use jQuery's xPath capability to locate an element in an arbitrary XML
> file loaded using Ajax?
Yes! For example:
$.post("test.xml",function(data){
$("//foo/bar",data).each( ... );
// or, with CSS:
$("foo > bar").each( ... );
});
It's important to note that jQuery only supports
Hi,
> Can I use jQuery's xPath capability to locate an element in an arbitrary
> XML file loaded using Ajax?
Yes:
$('/my/[EMAIL PROTECTED]',XMLDOMDocument)
Christof
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Newbie question:
Can I use jQuery's xPath capability to locate an element in an arbitrary XML
file loaded using Ajax?
Sam
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Or, more simply:
$("dl dt a").click(function(){
$(this).parent().next().show();
return false;
});
--John
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
$("dl dt a").click(function (event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().next().show();
});
Fil wrote:
>
>
> I want the expression to verify that the link is in the correct data
> structure, i.e. inside a that is inside a and where
> $(this).parent().ne
I want the expression to verify that the link is in the correct data
structure, i.e. inside a that is inside a and where
$(this).parent().next() is a .
Said differently: I want to tell my script "if the link is inside a
then show() the corresponding (if it exists)".
That's why I was trying t
In the SVN build of jQuery you can do:
$(this).parent().next().show();
jQuery SVN can be found here:
http://jquery.com/src/jquery-svn.js
--John
> I have the following structure:
>
>
> x
> text
>
>
>
> I select the element in this, and I want to show() the corresponding
Hello
I have the following structure:
x
text
I select the element in this, and I want to show() the corresponding dd.
This works but is not very precise:
$("../../dt/../dd", this).show();
I'm trying to write it more precisely with something like:
$("
34 matches
Mail list logo