Re: struts and javascript

2006-04-14 Thread 王曾wang_zeng
this is wrong. because as far as I know, a struts tag's atrribute sholud not be filled with mixed stuff by jsp codes and plain text. if you write this way: " > I guess the error won't occur.

Re: struts and javascript

2006-04-13 Thread Frank W. Zammetti
On Thu, April 13, 2006 12:26 pm, Michael Jouravlev said: > Or generate the target location in JSP like this: > > > var mytarget = > That's a good option too. > Then look up for target in your main Javascript function. I guess it > would be easier t

Re: struts and javascript

2006-04-13 Thread Michael Jouravlev
Or generate the target location in JSP like this: var mytarget = Then look up for target in your main Javascript function. I guess it would be easier to "attach" target to some well-know object like window, for example: window.mytarget = I am n

RE: struts and javascript

2006-04-13 Thread Frank W. Zammetti
The JS file is retrieved by the browser after the page loads and is not processed on the server, so the tag will not be interpreted. Either leave the script in the JSP as you mentioned, or include it in the JSP via server-side JSP include, or configure you web/app server to run .js files throu

[OT] Re: struts and javascript

2005-12-14 Thread Dave Newton
fea jabi wrote: In my JSP, have to use the defined variable in javascript. How can I use it? var totalObj = document.getElementById("total"); Wow, that's so far off I'm not even sure where to start. Marked OT because this has more to do with a fundamental misunderstanding of how webapps wor