ojoonline
01-18-2012, 06:39 AM
Hi,
I'm wondering if it's possible to set a variable to send through with my form using the confirm alert box.
Please let me know. Much appreciated.
[CODE]
<html>
<head>
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Would you like to stay logged into the website? Click OK to stay logged in for your next visit or CANCEL so your login won\'t be remembered.")
if (answer){
//how do I set this to rememberMe=1
}
else{
//how do I set this to rememberMe=0
}
}
//-->
</script>
</head>
<body>
<form action="test-alert2.cfm" method="post">
<input type="hidden" name="rememberMe" value="rememberMe">
<input type="submit" onClick="confirmation()" value="Login" />
</form>
</body>
</html>
[CODE]
I'm wondering if it's possible to set a variable to send through with my form using the confirm alert box.
Please let me know. Much appreciated.
[CODE]
<html>
<head>
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Would you like to stay logged into the website? Click OK to stay logged in for your next visit or CANCEL so your login won\'t be remembered.")
if (answer){
//how do I set this to rememberMe=1
}
else{
//how do I set this to rememberMe=0
}
}
//-->
</script>
</head>
<body>
<form action="test-alert2.cfm" method="post">
<input type="hidden" name="rememberMe" value="rememberMe">
<input type="submit" onClick="confirmation()" value="Login" />
</form>
</body>
</html>
[CODE]