Forum Moderators: open
<script language="JavaScript1.2" type="text/JavaScript">
<!--
function email()
{
//variables
var closedcall = "Do you want to notify the user that there call has been closed"
var emailnotice = "Do you want to email the user.";
var checkbox = document.form1.call_cleared.checked
//variables
//conditional statments
if(checkbox == true)
{
//Your call has been closed
(confirm(closedcall))
window.open('http://example.com/helpdesk/email/closedcall.asp?
callID=<%=(rsEmail.Fields.Item("callID").Value)%>','','width=270,height=100',
'top=500,left=500');
}
else if(checkbox == false)
{
//Notify the user of call progress
(confirm (emailnotice))
window.open('http://example.com/helpdesk/email/emailnotice.asp?
callID=<%=(rsEmail.Fields.Item("callID").Value)%>','','width=270,height=100',
'top=500,left=500');
}
else(email == false)
{
//Do Nothing
}
//conditional statments end
}
//-->
</script>
<input type="submit" name="Submit" value="Update" onClick="javascript: email()">
Bassically it comes down to if checkbox is check prompt and if its not prompt. Now here the part where I get stuck. If cancel is clicked do nothing.
What happens is it carries out the action anyway. Is there anyway to manipulate the cancel button so it won't open the window.
Thanks
fintan.
[edited by: tedster at 9:34 pm (utc) on Jan. 29, 2003]
[edit reason] stop side scroll [/edit]