| Author |
JS variable In JSP
|
Niklesh Mudiraj
Greenhorn
Joined: Jun 26, 2011
Posts: 10
|
|
|
Can we access variable/value of variable declare in JS in JSP page as we can use variable declare in JSP in JS .
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56150
|
|
Niklesh Mudiraj wrote:Can we access variable/value of variable declare in JS in JSP page
No, of course not. JSP executes on the server, JavaScript on the client. They cannot mix and match.
Please read this article to find out how JSP works and why that could never be
as we can use variable declare in JSP in JS .
You cannot use JSP in JS either. See above.
You can use JSP to write JavaScript that is then sent to the browser, but you are not using the JSP variable in the JS.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: JS variable In JSP
|
|
|