Visit Our Home Page
 Explored,Designed,Delivered.sm
Welcome, Guest. Please Login or Register (Password Reminder)


Creativyst Forums 
Support & Discussion 
Register Help Search Login  
   
   Creativyst Forums-TOP
   Web Site Design
   XML DSO  - How to Alternate Colors of table Rows
(Moderator: admin)
 Author
Topic: XML DSO  - How to Alternate Colors of table Rows       [Link=139]
Reply Please log in first.
a.sripriya@gmail.com
New Member


Posts: 2




     
    XML DSO  - How to Alternate Colors of table Rows   (Date posted: 09/21/05 at 15:49:18) Quote Modify Delete

Hi :

let me take the same example as everyone does.
<root>
<catalog>
<cd>CD 1 </cd>
<name>Lion King</name>
</catalog>
<catalog>
<cd>CD 3 </cd>
<name>Lion King</name>
</catalog>
<catalog>
<cd>CD 3 </cd>
<name>Lion King</name>
</catalog>
<catalog>
<cd>CD 4 </cd>
<name>Lion King</name>
</catalog>
<catalog>
<cd>CD 5 </cd>
<name>Lion King</name>
</catalog>
</root>

My HTML Piece fot the DAO looks like the following

<table DATASRC="#xmldso" width="98%" border="0" cellpadding="1" cellspacing="2" bgcolor="#FFFFFF" >
<thead>
<td>CD</td>
<td>Name</td>

</thead>
<tbody>
<tr>

<td bgcolor="#F3F3E8" class="cellTableBlue" ><DIV DATAFLD="cd"></DIV>
<td bgcolor="#F3F3E8" class="cellTableBlue" ><DIV DATAFLD="name"></DIV>
</tr>
</tbody>
</table>

My Question is: How can alter the colors of the table depending on its position. that is all odd rows should have class="cellTableBlue" and the even rows should have class="cellTableWhite". I would appreciate very much if anyone could answer this. Thanks in advance.

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: XML DSO  - How to Alternate Colors of table Ro   (Date posted: 09/22/05 at 15:03:05) Quote Modify Delete

a.sripriya,

My first reflex is to say: "you're going to need to throw a little JavaScript code at this one".

I've been wrong before when making such quick conclusions, so as soon as I get time, I'll go see if there isn't some way to do this without code.

I suspect not but, as mentioned, it's easy to get burnt jumping to seemingly obvious conclusions.

-djr

   E-Mail   Ip: Logged
a.sripriya@gmail.com
New Member


Posts: 2




     
    Re: XML DSO  - How to Alternate Colors of table Ro   (Date posted: 09/24/05 at 11:44:33) Quote Modify Delete

Yup, I did use javascript, Xml and XSL in order to achive this. but, i am struck with something.

My XML DSO looks like the following:

<NodeElem>
<child1>value1</child1>
<child2> <a href="somelink.htm" >value2</a> <a href="somelink.htm" >value2</a> </child2>
<child3>value3</child3>
</NodeElem>

However, the table data displays the anchor element as it is: <a href="somelink.htm" >value2</a> and I don;t see the value two as Hyperlink. Kindly Help with this.

if there is a way for this, then it would be easy for me to manipulate in the xsl to generate this xml output in order to produce the desired code.It would be great if we can achieve this without code, if it is possible

Thanks a lot. I would appreciate if you can help

   E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: XML DSO  - How to Alternate Colors of table Ro   (Date posted: 09/26/05 at 12:54:25) Quote Modify Delete

a.sripriya@gmail.com,

That sounds familiar. Check out the thread here titled: XML and Links

Let me know if this helped you.

-djr

   E-Mail   Ip: Logged
Reply Please log in first.
Pages: 1
Jump to:

YaBB Board c 2000
YaBB Programming Team
 



















© Copyright 2002 - 2008 Creativyst, Inc.