i want to convert javascript variable to java variable i have following code:
but i am getting error :
HTTP Status 500 - Request processing failed; nested exception is java.lang.Numbe rFormatExceptio n: For input string:
Code:
<script>
function increaseValue(strid,p,pr) {
var v = parseInt(strid.value);
v= isNaN(v) ? 0 : v;
v++;
strid.value = v;
var total=v*p;
pr.value=total;
}
function decreaseValue(strid,p,pr) {
var v = parseInt(strid.value);
v = isNaN(v) ? 0 : v;
v < 1 ? v = 1 : '';
v--;
strid.value = v;
var total=v*p;
pr.value=total;
}
</script>
<% String st="<script>document.writeln(total)</script>"; %>
HTTP Status 500 - Request processing failed; nested exception is java.lang.Numbe rFormatExceptio n: For input string:
"<script>docume nt.writeln(tota l)</script>"
can please someone help me to solve it?