February 16, 2014 at 11:46 pm
I want to show my data in different row color. I use bellow xquery. But it didn't work.
Could you help me?
FOR XML path('div'),type).query('
<tbody> { for $div in div return
<tr class="row_hover" id="tr_2_1_0" >
<td class="center"><input type="checkbox" name="productBox[]" value="1" class="noborder" /></td>
<td class="pointer center" onclick="document.location =''good.html''">{data($div/@usedforid)}</td>
<td class="pointer center" onclick="document.location =''good.html''"><img src="{$div/@img}" alt="" class="imgm" /></td>
<td class="pointer right" onclick="document.location =''good.html''">{data($div/@answer)}</td>
<td class="pointer right" onclick="document.location = ''good.html''">???? ????</td>
<td class="pointer center rtl" onclick="document.location = ''good.html''"> 10,000,000 ریال </td>
<td class="pointer center" onclick="document.location = ''good.html''">1392/07/07</td>
<td class="pointer center" onclick="document.location = ''good.html''">1392/07/07</td>
<td class="pointer center" onclick="document.location = ''good.html''"><a href="good.html" title="{$div/@Enab}"> <img src="../images/enabled.gif" alt="{$div/@Enab}" /></a></td>
<td class="center" style="white-space: nowrap;"><a href="{data($div/@h)}" class="edit" title="ویرایش"> <img src="images/edit.gif" alt="ویرایش" width="25" height="25" /></a> <a class="pointer" title="تکثیر کردن" onclick="if (confirm(''Copy images too?'')) document.location =''duplicate.htm''; else document.location = ''duplicate.htm''; "> <img src="../images/duplicate.png" alt="تکثیر کردن" width="25" height="25" /></a></td>
</tr>
<tr class="alt_row row_hover" id="tr_2_2_0" >
<td class="center"><input type="checkbox" name="productBox[]" value="1" class="noborder" /> </td>
<td class="pointer center" onclick="document.location =''good.html''">{data($div/@usedforid)}</td>
<td class="pointer center" onclick="document.location =''good.html''"><img src="{$div/@img}" alt="" class="imgm" /></td>
<td class="pointer right" onclick="document.location =''good.html''">{data($div/@answer)}</td>
<td class="pointer right" onclick="document.location = ''good.html''">???? ????</td>
<td class="pointer center rtl" onclick="document.location = ''good.html''"> 10,000,000 ریال </td>
<td class="pointer center" onclick="document.location = ''good.html''">1392/07/07</td>
<td class="pointer center" onclick="document.location = ''good.html''">1392/07/07</td>
<td class="pointer center" onclick="document.location = ''good.html''"><a href="good.html" title="{$div/@Enab}"> <img src="../images/enabled.gif" alt="{$div/@Enab}" /></a></td>
<td class="center" style="white-space: nowrap;"><a href="{data($div/@h)}" class="edit" title="ویرایش"> <img src="images/edit.gif" alt="ویرایش" width="25" height="25" /></a> <a class="pointer" title="تکثیر کردن" onclick="if (confirm(''Copy images too?'')) document.location =''duplicate.htm''; else document.location = ''duplicate.htm''; "> <img src="../images/duplicate.png" alt="تکثیر کردن" width="25" height="25" /></a></td>
</tr>}</tbody>'))
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply