xsl-list
[Top] [All Lists]

Re: add new line to an html table with xsl

2003-03-18 05:03:03
the button is just a way to call some service on the server or the client (??) 
that returns the document with a new row.
but the pb is that i would like to add the new line dynamically i dont want to 
make a refresh of the page
is it possible


Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com a écrit :

Hi,

i would like to create a button in my html page which allows
the user to
add new lines to its html table. I would like to code this in xsl by
using an if condition and a variable declaration:

<xsl:variable name="newLine">
 <td>
  <input border="0" name="toto" size="10" type="text" />
</td>
</xsl:variable>

<table>
.....
<xsl:if "test=...">
 <xsl:copy-of  select="$newLine"/>
</xsl:if>

</table>

How is the button supposed to work? Will it run the XSLT transformation on 
the client using ECMAScript, or will it call some service on the server that 
return the document with a new row? Your XSLT looks correct, but you have to 
specify where will the transformation take place. Anyhow, I'd suggest using 
DOM for this.

Cheers,

Jarno - This Morn'Omina: One Eyed Man

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

--

Laurence MOSSUZ

LAPP Service Informatique
Chemin de Bellevue BP 110
74941 Annecy-Le-Vieux CEDEX
Tel : 04 50 09 17 31 _ Fax : 04 50 27 94 95



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list