Search:
Calendar:
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Subscribe:
Archives By Subject:
AIR (6) [RSS]
Ajax (3) [RSS]
Buzzword (1) [RSS]
CFUG (39) [RSS]
ColdFusion (65) [RSS]
Flash (5) [RSS]
Flex (37) [RSS]
Frameworks (2) [RSS]
Free Software (2) [RSS]
FXUG (21) [RSS]
General (33) [RSS]
JpgMetadataReader (3) [RSS]
jQuery (1) [RSS]
Mac (2) [RSS]
Off Topic (13) [RSS]
OpenSource (13) [RSS]
PaperVision (10) [RSS]
Spry (2) [RSS]
Tags:
Recent Entries:
Top Posts:
- [10495] Paper Vision 3D Sphere - Carousels on Steroids!
- [5553] PaperVision Carousel0.3 - one step closer to the master plan!
- [5501] Carousel v0.2 - source code
- [5498] Simple PaperVision3D Blurring example
- [5496] PaperVision3D/Flex2 Carousel v0.2
- [5219] Saving images from Flex using ColdFusion: Simple Example with source code
- [4781] PaperVision3D is good for cubes! - a "geek" gift
- [4632] Simple Dynamic Cursor Example in Flex2: With source code
- [4507] Simple PaperVision3D Blurring example : source code
- [4010] PaperVision, Flex2 and my daughter all playing together!
Recent Comments:
- Paper Vision 3D Sphere - Carousels on Steroids!
Evan said: Now I feel dumb but where is the source. This looks really close to what I want to create and anyth... [More] - Paper Vision 3D Sphere - Carousels on Steroids!
Michael said: Nice Effect [More] - Saving images from Flex using ColdFusion
Priya said: nice !! how to do give some hint [More] - Learn Flex and Air and win stuff!
Jasen said: Would be good to start to learn. [More] - Adventures in jQuery
Joe Roberts said: I'm glad you are finding the project useful. I agree, I find it quite liberating to be able to fill ... [More]
Top Commenters:
- [8] Campbell
- [8] Ben Nadel
- [6] Mark Flewellen
- [6] Steve Bryant
- [4] barry.b
- [4] Raymond Camden
- [3] Peter Bell
- [2] Dan Wilson
- [2] carlos
- [2] riabook
My Links:
RSS:
A Spry/Javascript gotcha!
I am trying out Spry a bit, and this of course means I need to be brushing up on my JavaScript, and XPath to, as Spry uses XPath on the XML datasets...
I run in to a "this works in FireFox, but not IE" issue that turned out to be my understanding of JavaScript, and not Spry.
Read on for more detail...
I had an example where the XML I was using was something like this:
<image name="01.jpg" width="267" height="270">
<caption></caption>
<tags>
<tag>Family</tag>
<tag>Fun</tag>
<tag>Fred</tag>
</tags>
</image>
<image name="02.jpg" width="267" height="270">
<caption>My Caption here</caption>
<tags>
<tag>Sun</tag>
</tags>
</image>
</images>
Each Image can have none, one or many "tag" nodes in the "tags" node.
I was attempting to get the tags using XPath like this:
As you can see from that, I am getting the tags for the image with the name "01.jpg"
The next step was when the user clicked on the name of any other images in the XML dataset, load the image and then get the tags for that image and display them.
The code in the function that handled the click was something like this:
The above line of code worked in FF fine, but not in IE. Of course I blamed Spry as any good developer would, and posted a thread on the Spry forums.
...turns out the problem is my Javascript... Can you see my mistake, can ya? huh, huh?
The answer was post by Kinblas of Adobe:
[Quote]
@ is an illegal character in JavaScript:
The difference is refering to the "name" attribute like this:
Check out the Forum Thread
Thanks Kin for the answer!

There are no comments for this entry.
[Add Comment]