Forum



20:11

12/04/2010

I am using jqGrid 3.6.4. In my onSelectRow, I am trying to develop an iterated <li></li> set for each picture data within a static xml file. This picture data then gets "appended" into a specific <div> to be used by galleriffic slide show application. I know galleriffic can handle 'stacked' <li></li> sets when I tested it through hard-coding. When the xml file only has one set of picture data (one picture associated with object), my application works just fine between jqGrid and Galleriffic. Problem comes in when there are multiple picture data. jqGrid is concatinating all the urls together (one right after another one) and then it concatinates the titles together (one right after another one), instead of developing the 'stacked' <li></li> like I want it to. Any suggestions on how I can get jqGrid to change its mind on how it sees multiple pictures???
here is my portion of onSelectRow script:
And here is the portion of my xml file (5 pictures to be script developed):
<pic>
<asset>weaponLib/stillMedia/slides/A106.jpg</asset>
<thumb>weaponLib/stillMedia/thumbs/A106.jpg</thumb>
<caption>Side view of DODIC A106</caption>
<title>Side view of 22 caliber long rifle ball cartridge</title>
</pic>
<pic>
<asset>weaponLib/stillMedia/slides/A106_A.jpg</asset>
<thumb>weaponLib/stillMedia/thumbs/A106_A.jpg</thumb>
<caption>Side view of DODIC A106</caption>
<title>Side view of 22 caliber long rifle ball cartridge</title>
</pic>
<pic>
<asset>weaponLib/stillMedia/slides/A106_B.jpg</asset>
<thumb>weaponLib/stillMedia/thumbs/A106_B.jpg</thumb>
<caption>Side view of DODIC A106</caption>
<title>Side view of 22 caliber long rifle ball cartridge</title>
</pic>
<pic>
<asset>weaponLib/stillMedia/slides/A106_C.jpg</asset>
<thumb>weaponLib/stillMedia/thumbs/A106_C.jpg</thumb>
<caption>Side view of DODIC A106</caption>
<title>Side view of 22 caliber long rifle ball cartridge</title>
</pic>
<pic>
<asset>weaponLib/stillMedia/slides/A106_D.jpg</asset>
<thumb>weaponLib/stillMedia/thumbs/A106_D.jpg</thumb>
<caption>Side view of DODIC A106</caption>
<title>Side view of 22 caliber long rifle ball cartridge</title>
</pic>
</photo>
Here is how it comes out in my DOM (IE7/8 Developer Tools):
jqGrid then closes my <li> tag.
How do I get jqGrid to quit concatinating the data?? It is probably something quite simple.
A working online version of my application can be seen at serco-hrc.com/testMe/index.html. Select "ok", then small arms menu.
to see the multiple item issue, select Dodic A106 (third one down on the jqGrid). Then select "slideshow" on the resulting tab that opens. The first two DODICs listed in the jqGrid work just fine if you wnat to see it work.
Tony
13:37

Moderators
30/10/2007

Hello,
I'm not sure that I understand the problem. Also jqGrid does not closes any <li> tag. The problem is maybe how you write this long string.
I suggest you first to try with simple tags without classes and data and see if this work, then add step by step additional code and see the result.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
18:59

12/04/2010

Tony,
Ok, I know my string works when my application (through xml file) only has one picture to display. It generates an appropriate <LI></LI> tag.
My problem arises when the xml file has multiple <pic> elements that jqGrid must iterate through to generate the stacked <li></li> tags. I can see my problem when I dig into the DOM via IE Web Developer. I am at a loss as to how to get jqGrid to sequence properly. I can see in the DOM where jqGrid is generating the table. Inside the <td> tag for the images, jqGrid is grabbing ALL of the pic URLs and putting them all together as one URL (concatinated). It does the same thing to the title portion too.
I put a copy of the application up on my temp site (http://www.serco-hrc.com/testM.....index.html). Small Arms -> A085 builds the <li></li> tag correctly. Small Arms -> A106 has multiple pics (i.e., multiple <li></li> tags) to build. Make sure that you refresh your browser between viewing the rows as I have not developed the script to kill the cache from a previous operation.
I don't konw why jqGrid would work fine in one instance and not in another when the same script is doing the operation. I can see what it is doing wrong, just lost as to how to fix it.
Tony
Most Users Ever Online: 715
Currently Online:
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66