Issac,
        Not sure if this got wrapped in the email or if it is on two lines
in your code, but I tried placing the confirm text all on one line
and it worked fine.

if (confirm('Are you sure you want to DELETE the Page you selected?
This will also delete any SUB articles of this item!!')) {

versus

if (confirm('Are you sure you want to DELETE the Page you selected? This
will also delete any SUB articles of this item!!')) {

                
                  Todd

-----Original Message-----
From: Rosa, Issac [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 3:32 PM
To: CF-Talk
Subject: Slightly OT: Javascript Error - Confirmation Box


I have the following javascript and form.  Can anyone see why I am not
getting the confirm box?  No error messages, just processes the form without
the confirm.  Any help would be greatly appreciated.

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Action Page</title>

<!--- check the user wants to delete the PAGE they selected --->
<script language="JavaScript">
        function checksure() {  
        if (confirm('Are you sure you want to DELETE the Page you selected?
This will also delete any SUB articles of this item!!')) {
                return true; }
        else {
                return false; }         
        }
</script>

</head>

<body>
<cfoutput>
<cfif URL.a is "Delete">
        <cfset CheckDelete = "return checksure();">
<cfelse>
        <cfset CheckDelete = "return checksubmit();">
</cfif>

<cfoutput>
<form action="action.cfm" method="post" name="update"
onsubmit="#CheckDelete#">

..... Form Fields

<input type="submit" value="<---- #URL.a# ---->" name="update"
class="formboxes"></td></tr>
        <input type="hidden" name="action" value="#URL.a#">
        <input type="hidden" name="id" value="#URL.ID#">
        <input type="hidden" name="lev" value="#URL.lev#">
        <input type="hidden" name="WebSiteIDNo" value="2">
</cfif>
</form>

Thank you,

> Issac Rosa
> 
> IT - National Sales & Marketing
> OLAP Specialist Team Lead
> Ofc: 407-658-3111
> Cell: 407-342-0644
> Fax: 407-971-2374
> [EMAIL PROTECTED]
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to