I assume the reason you posted this is because it isn't working.

A better approach for this page of yours would be to change the delete 
'submit' to a delete 'button'.  A submit will automatically send the 
form, regardless of javascript errors, while a button does only what 
you tell it to do.  In order to use a 'submit' successfully, you would 
want to put the verify in the form tag.  (onSubmit="return verify()")

<input name="delete" type="button" value="Delete" onClick="if(verify())
{this.form.submit();}">

let me know how it works for you.

William

-----Original Message----
-From: [EMAIL PROTECTED]
-Date: Sep 13, 2007 14:09 
-To: "CF-Talk"<[email protected]>
-Subj: An edit and delete button
-
-I've got an edit and a delete button and want to have a confirmation 
dialog box if the delete button is submittted.  If the edit button is 
clicked, don't show the confirmation alert popup.  Here's what I have.
-<table width="719" border="0">
-<cfoutput><form name="form1" method="post" action="#cgi.SCRIPT_NAME#"
></cfoutput>
-  <tr>
-    <td width="134" align="right">Existing Stores:</td>
-    <td width="476">
-  <select name="storesid" id="storesid">
-<option value="">Choose Store</option>
-<cfoutput query="get_stores">
-<option value="#id#">#left(store, 30)# - <!--- #Address# ---> #City# 
#state# </option>
-</cfoutput>
-  </select> 
-  
-  <input name="editgogo" type="hidden" id="editgogo" value="yes">
-  <input type="submit" name="edit" id="edit" value="Edit">     
-  <input name="delete" type="submit" value="Delete" onClick="return 
verify()"></td>
-  </tr>
-  <tr>
-    <td align="right">&nbsp;</td>
-    <td>
-<CFIF ISDEFINED ("URL.MESSAGE")>
- <CFIF URL.MESSAGE EQ "added">
-    <span class="GreenWind">The store has been added</span>
-    <CFELSEIF URL.MESSAGE EQ "updated">
-    <span class="GreenWind">The store has been updated</span>
-    <CFELSEIF URL.MESSAGE EQ "deleted">
-    <span class="GreenWind">The store has been deleted</span>
- </CFIF>
-</CFIF>
-    </td>
-  </tr>
-  </form>
-</table>
-
-


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288423
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to