When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between javascript, visual basic, and vbscript non-interchangable?
I created the following code:
- <script language="javascript">
-
function question(){
-
strReply = confirm('Click Yes if you wish to continue.')
-
alert(strreply)
-
}
-
</script>
I would then like to take action based on the user response in the VB code.
<%
Test value of strReply and perform code based on the response
%>
The problem is, that although the reply variable can be read with the alert command in the Javascript section, it cannot be read in the VB code. I tried creating a reply input field:
<input id="reply" name="reply" type="text" value="<%=strReply%>"/>
and then in the Javascript section, entering the following command:
document.frmKPIActMaintLoc_01.reply.value = strReply
but it also did not work.