Instead of hard coding the entire path, you should use the context path to
get your webapp directory and then specify the path from there.

If you had the following directory structure:

-tomcat
 -webapps
  -myWebapp
   -js
    -sortTable.js

You would specify the src attribute like this: src="<%=
request.getContextPath() %>/js/sortTable.js"

The page would be renderer like this: src="/myWebapp/js/sortTable.js"

This makes the page more portable.

 -----Original Message-----
From:   Thomas CORNET [mailto:[EMAIL PROTECTED] 
Sent:   Monday, March 31, 2003 9:25 AM
To:     Struts Users Mailing List
Subject:        RE: [OT] 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.

 > My answer was : let the script tags where they are otherwise it won't
work.

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 ?

 > Yes. See previous answer.

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 ?

 >
place the code line like :

function initFunction(arg)
{
alert("function found and starting");
..... rest of code
}

the aim of alert() is to display a little popup with text inside. If it 
displays, the javascript is being executed.

if nothing is displaying, the path to the script library isn't good. Try to 
put an absolute path in your page.



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

Reply via email to