I have tried this many a times but unable to do this. first let me put my code. ::
<script type="text/javascript">
function delemp(v){
alert(v);
<%
String abc=%>v<%;
%>
out.println(abc);
}
</script>
<script type="text/javascript">
$(document).ready(function(){
var h= "Shantanu";
delemp(h);
});
</script>
In the above code. I am calling delemp(h);. That should assign value "Shantanu" to variable abc. and then print that value. But i am unable to do this. when i comment the scriptlet part and run only alert(v) it gives me value Shantanu that is value is passing to function delemp(v). But unable to assign it to abc. It gives me an error ::
Type Mismatch: cannot convert from Void to string.
Where's the prob? thanks..