Update ASP Confirmation Box Javascript Confirm Record

In Knowledge Base Blog by angeladmin

query3=”select * from customerinfocustsoft where customercode='” & getid(clientid) & “‘”
set rs3=server.createobject(“adodb.recordset”)
rs3.open query3, asconn, 2, 3
if not rs3.EOF then
expirationcurrent=rs3(“expiration”&indexid)
if cstr(expirationcurrent)<>cstr(expiration) then
%>
<form id=”f2″ name=”f2″><input type=”hidden” name=”actionvar2″ value=”<%=actionvar%>” /></form>
<script language=javascript>
var x=confirm(‘Expiration Date Current Value is <%=expirationcurrent%>nAre you sure you want to replace it with <%=expiration%>?’);
if(x==false)
{
document.getElementById(“actionvar2″).value=””;
}
</script><%
end if
end if
rs3.close
set rs3=Nothing

Angel Computers – Contact Us