This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to supply jsp variable to Javascript function  RSS feed

 
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
 
Ranch Hand
Posts: 307
  • 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?
 
Paper beats rock. Scissors beats tiny ad.
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!