- see footer for list info -<
Wouldn't it be execute?
cheers
----- Original Message -----
From: "Damian Watson" <[EMAIL PROTECTED]>
To: "Coldfusion Development" <[email protected]>
Sent: Wednesday, June 28, 2006 12:15 PM
Subject: Re: [Spam] Re: [CF-Dev] OT - JS
>- see footer for list info -<
> Are you sure you want to delete this victim?
Sounds rather sinister! lol
Paul Swingewood wrote:
- see footer for list info -<
Thanks for all that ....
I know have the function as ....
function confirm_entry(passedvar)
{
input_box=confirm("Are you sure you want to delete this
victim?");
if (input_box==true)
{
// submit the form to the delete page
alert (passedvar);
document.IncidentForm.action='ModifyDelete.cfm';
}
else
{
// Output when Cancel is clicked
alert ("You clicked cancel");
}
}
//-->
</script>
<form name="IncidentForm" action="WriteData.cfm" method="post"
onSubmit="submitForm();">
<input type="hidden" name="FormNumber" value="4">
<table border="0" width=95%>
<tr>
<td valign="top" colspan="4"><b><cfoutput>#session.user# -
#Session.DFESNo#</cfoutput></b></td>
</tr>
<tr>
Blah Blah Blah
<tr>
<td align="left">
<input type="submit" name="btnAddVictim" value="Add
another victim" onClick="this.form.action='WriteData.cfm?rpt=1';">
</td>
<cfif #NumberOfVictims# GT 1>
<td align="center">
<cfoutput>
<input type="submit" name="btnDeleteVictim" value="Delete
this victim" onclick="confirm_entry(#RecordToGet#);">
</cfoutput>
</td>
</cfif>
<!--- If there are no more records in the list then don't
show the next victim button --->
<cfif URL.ElementToGet LT ListLen(VictimIdList)>
<td align="right">
<!--- if there are then increment the
elementtoget --->
<cfset ElementToGet = URL.ElementToGet + 1>
<cfoutput>
<input type="submit" name="btnNextVictim" value="Next
victim"
onClick="this.form.action='ModifyData.cfm?rpt=1&ElementToGet=#ElementToGet#&record=#RecordToGet#';">
</cfoutput>
</td>
</cfif>
<td align="right">
<cfoutput>
<input type="submit" name="btnNextForm" value="Next"
onClick="this.form.action='ModifyData.cfm?record=#RecordToGet#';">
</cfoutput>
</td>
</tr>
</table>
</form>
A couple of things ....
How do I set the hidden field in the function. Do I have to define
something in the form first? Im not sure of the syntax to refer to a
field form in JS.
Also how do I make the cancel do nothing (Return to the page) at present
it submits the form with its default action .....
Regards - Paul
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<