| Author |
JavaScript var inside JSP Scriptlets
|
Chua Keng Guan
Greenhorn
Joined: Oct 11, 2006
Posts: 10
|
|
<script type="text/JavaScript"> var a = 1; <% JavaFile.staticInt = a %> </script> The above example will cause a error stated that varible a is not found(no such symbol). Do anyone know how to solve this problem. Thanks
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
JSP is server side script, so you won't access Javascript variables. Try to figure out another way to get the needed data.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
You have a fundamental misunderstanding of what JSP technology is all about. Perhaps this article will be helpful. [ October 17, 2006: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: JavaScript var inside JSP Scriptlets
|
|
|