Title: RE: Tiles with logic:iterate and JavaScript to sort table

Sorry, but I don't know _javascript_ very well and I don't
understand your remark.
In my example the call to the function initTable("table0");
is done after the definition of the table <table id="table0".
So the navigator know its name, isn't it ?
it is probably the _javascript_ which is not called.
but I do not know how to make this test.
I added the line  alert("function found and starting..");,but nothing
what is the aim of this instruction ?

I joined the _javascript_.
Thanks in advance for your help
 

----------------------------------------------------------------------------
As of February 12th, 2003 Thomson unifies its email addresses on a worldwide basis.
Please note my new email address: [EMAIL PROTECTED]

http://www.thomson.net/

----Original Message-----
From: Thomas CORNET [mailto:[EMAIL PROTECTED]]
Sent: 31 March 2003 14:32
To: Struts Users Mailing List
Subject: Re: Tiles with logic:iterate and _javascript_ to sort table



   As the 'initFunction' function has a parameter which is the name of the
table, its call should stay at the bottom of the page. If you put it at the
top, there will be an error because the table hasn't been yet processed by
the navigator so it can't know its name. To ensure the script is called,
just put a debugging message at the first line of 'initFunction' in your
script, such as

         alert("function found and starting..");


                      Thomas

At 14:18 31/03/2003, you wrote:

>         I have a Struts web application with the following JSP page that
>allows to display table.
>         I would like to allow the user to sort column.
>
>         <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
>         <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
>         <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
>
>         <html:form action="" method="GET">
>
>         <table id="table0" width="100%" border="1" cellpadding="0"
>cellspacing="0" bordercolor="#FFFFFF">
>
>         <%-- Title for the columns of the table --%>
>         <tr bgcolor="#FFCC00">
>             <th align=left width="10%"><bean:message key="title.id"/></th>
>             <th align=left width="10%"><bean:message key="title.name"/></th>
>         </tr>
>
>         <logic:iterate name="myForm" id="employees" property="employees"
>type="myBean.Employee" offset="offset" length="length">
>         <tr bgcolor="#EBEBEB">
>             <td bgcolor="#EBEBEB" width="10%">
>               <html:link href="">
>                 <bean:write name="employees" property="id"/>
>               </html:link>
>             </td>
>
>             <td bgcolor="#EBEBEB" width="10%">
>               <bean:write name="employees" property="name"/>
>             </td>
>         </tr>
>         </logic:iterate>
>
>         </table>
>
>         <script src="">
>         <script>initTable("table0");</script>
>         </html:form>
>
>         This page extends a common model classicLayout.jsp.
>         Do I have to call the script in the <head> of the classicLayout.jsp
>?
>
>         I placed the _javascript_ file sortTable.js in the same directory as
>my JSP.
>         But it doesn't work, has someone an idea of the problem ?
>
>
>
>----------------------------------------------------------------------------
>
>As of February 12th, 2003 Thomson unifies its email addresses on a worldwide
>basis.
>Please note my new email address: [EMAIL PROTECTED]
>
>http://www.thomson.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

[Filename: sortTable.js, Content-Type: application/octet-stream]
Thomson policy does not allow executable code to be sent inbound via email.  Use 
ftp://ftp.thmulti.com for inbound file transfers.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to