>- see footer for list info -<
this.form.action='ModifyDelete.cfm?ID=#recordtoget#';

should be

document.IncidentForm.action='ModifyDelete.cfm?ID=#recordtoget#';

Nick

----- Original Message ----- 
From: "Paul Swingewood" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 28, 2006 10:50 AM
Subject: [CF-Dev] OT - JS


> >- see footer for list info -<
> Can anyone help me with this please ....?
>
> I have a form with several buttons on it. One of the button is delete. I
> want to give a "Are you sure popup" and then direct to the page that does
> the delete .... I have this
>
> <script language="JavaScript">
> <!--
> function submitForm()
> {
> document.IncidentForm.clickme.value = "Please Wait...";
> document.IncidentForm.clickme.disabled = "disabled";
> return true;
> }
> function confirm_entry()
> {
> input_box=confirm("Are you sure you want to delete this victim?");
> if (input_box==true)
> {
> // submit the form to the delete page
> this.form.action='ModifyDelete.cfm?ID=#recordtoget#';
> }
> else
> {
> // Output when Cancel is clicked
> alert ("You clicked cancel");
> }
> }
> //-->
> </script>
>
>
> The form is like this ......
>
> <form name="IncidentForm" action="WriteData.cfm" method="post"
> onSubmit="submitForm();">
>
> Blah blah blah ....
>
> and then the submits are like this ....
>
> <tr>
> <td align="left">
> <input type="submit" name="clickme3" 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="clickme4" value="Delete this victim"
> onclick="confirm_entry();">
> </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="clickme1" value="Next victim"
>
onClick="this.form.action='ModifyData.cfm?rpt=1&ElementToGet=#ElementToGet#&reco
rd=#RecordToGet#';">
> </cfoutput>
> </td>
> </cfif>
> <td align="right">
> <cfoutput>
> <input type="submit" name="clickme2" value="Next"
> onClick="this.form.action='ModifyData.cfm?record=#RecordToGet#';">
> </cfoutput>
> </td>
> </tr>
>
> When the user clicks ok the page goes to writedata instead of modifydelete
> .....
>
> What am I doing wrong?
>
> 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 -<

Reply via email to