• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in JavaScript

 
Dipti Mishra
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

Can anyone tell me how do we call a java script method in a JSP file.Can we use it directly call it? Can we retrieve a session variable in javascript? if yes, then please specify how? and if no then do tell me the reason.

Thanks in advance.

regards,
Dipti
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javascript is interpreted in the browser (client side) whereas JSP is interpreted on the server.

The easiest way to understand the implications of this is to think:
"The JSP writes the HTML and Javascript which the browser will interpret."
and to use your browser's "View -> Source" option to look at the actual HTML/Javascript code which was the output from your JSPs execution.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic