blueindian1
Programmer
Hi,
Is it possible to assign a value to a JSP variable with a script? I want to do something like the following:
The way I have it, the string has a new value assigned regardless of whether the "if" condition is met
Thanks,
Rich
Is it possible to assign a value to a JSP variable with a script? I want to do something like the following:
Code:
<% String str = "jsp"; %>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.all) {
<%str = "modifed_by_the_script"; // assignment only when condition is met%>
alert("Internet Explorer Detected");
}
// -->
</SCRIPT>
The way I have it, the string has a new value assigned regardless of whether the "if" condition is met
Thanks,
Rich