Why not just enclose the whole page in an if statement?  Make sure you name
your submit button something unique.

 <CFIF isDefined("form.A")>
   Your code here
<CFELSE>
    You got to this page in error.
</CFIF>

  You could do this with any field on the form, it doesn't have to be the submit
button.  Perhaps a hidden field, entitled 'FormName' with the value A?

   If anyone wants to jump in with a way to check the name of the form on the
submitting page, now would be the time.  I've seen it accessed (via javascript)
on the current page, but never on the page it submits to.


Kevin Miller wrote:

> HTTP_Referer is a client-supplied, optional element.  How widely is it
> implemented?  At the very least, you might want to make some contingency
> for the value being blank.
>
> Regards,
>
> Kevin
>
> >>> [EMAIL PROTECTED] 01/03/01 03:44PM >>>
> use HTTP_REFERER and make sure it's page A or don't execute page B.
>
> -----Original Message-----
> From: Parker, Kevin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 2:55 PM
> To: CF-Talk
> Subject: Calling another page
>
> Can someone give me some advice here please.
>
> I have a form called A where the action template is called B. How can
> I
> ensure that B can only be executed by clicking the submit button on A?
>
> TIA!!!
>
> ********************************
> Kevin Parker
> Manager, Web Services
> Service and Communication
> WorkCover Corporation
>
> [EMAIL PROTECTED]
> www.workcover.com
>
> ph:   +61 8 82332548
> fax:  +61 8 82332000
> mob: 0418 800 287
> ********************************
>
> ****************************************************************************
> This e-mail is intended for the use of the addressee only. It may
> contain
> information that is protected by legislated confidentiality and/or is
> legally privileged. If you are not the intended recipient you are
> prohibited
> from disseminating, distributing or copying this e-mail. Any opinion
> expressed in this e-mail may not necessarily be that of the WorkCover
> Corporation of South Australia. Although precautions have been taken,
> the
> sender cannot warrant that this e-mail or any files transmitted with it
> are
> free of viruses or any other defect.
> If you have received this e-mail in error, please notify the sender
> immediately by return e-mail and destroy the original e-mail and any
> copies.
> ****************************************************************************
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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