• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to supply jsp variable to Javascript function

 
satyaprasad veeramsetti
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have developed jsp file which contains javascript as below.


One.jsp[/b]




1. Initially i have called the above jsp, So there is no session value. then writeRichText('rte1', '', 380, 100, true, false) called successfully, I got output. Suppose if it will redirect to another page, in that page session is set some value(i have written code to set session scope in another jsp page) then redirect to One.jsp file. At this movement we have session scope value. So obviously if condition is true. But writeRichText('rte1', '<%=str_htmlValue1%>', 380, 100, true, false) is not called.

Please tell me the reason & give solution for this problem.



Thanks inadvance.
Satyaprasad
 
Albareto McKenzie
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Poor practice to write Java code in JSPs, everything you are doing you can do it with JSTL tags.

I don't know if it is obvious that second time you have the attribute in the session, have you debug it to check that you actually have it? What's the generated html you get for that piece of page?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!