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:
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="<%=strRe ply%>"/>
and then in the Javascript section, entering the following command:
document.frmKPI ActMaintLoc_01. reply.value = strReply
but it also did not work.
I created the following code:
Code:
<script language="javascript">
function question(){
strReply = confirm('Click Yes if you wish to continue.')
alert(strreply)
}
</script>
<%
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="<%=strRe ply%>"/>
and then in the Javascript section, entering the following command:
document.frmKPI ActMaintLoc_01. reply.value = strReply
but it also did not work.
Comment