Use JSP implicit object with Java script
Hello,
greetings,
can we use JSP implicit object with java script method like"request.getElementById("")".
And if we can use this then what will be return type of this line of codeing. And one more thing can we use this in side JSP page.
Help me please, Thanks.
Warm Regards
Ashish
Re: Use JSP implicit object with Java script
hi,
You can definitely use this inside jsp.
Example:
<script language="javascript">
function abc(){
var pqr= document.getElementById("firstName").value;
}
</script>
hope this will help.
Re: Use JSP implicit object with Java script
if jsp implicit oject that ur speaking is so what like this request.getAttribute("name") then javascript u can call it as expr..
<% String name_scriplet = (String)request.getAttribute("name"); %>
<script>
var name ="<%= name_scriplet%>";
</script>