Michael,
Can you base your test on the existence of CFTREEITEMKEY rather than the
value of HTTP_REFERER? That is, use
<cfif isDefined("CFTREEITEMKEY")>
rather than
<Cfif FindNocase("finduserby",#HTTP.HTTP_REFERER#) NEQ 0>
-David
On Fri, 7 Jul 2000 11:57:27 +0100 Michael O Reilly <[EMAIL PROTECTED]>
writes:
> Okay here goes,
>
> I have a CFTREE with a list of users.
> Double clicking on a user passes the user's ID into a page as
> CFTREEITEMKEY=userid
> This value along with some others are put into a form and the page
> is
> submitted automatically
> using <BODY onLoad="submit()">
> This then opens an ISAPI DLL I wrote in Delphi to retrieve users
> rosters
> from a strange Btrieve Database we have here.
> I know Btrieve has ODBC drivers ut this DB contains all sorts of
> packed
> record structures (a real nightmare to get data from).
> The reason I create a form and submit it to the DLL is because I
> don't want
> users to see their ID being passed into the DLL as part of the URL.
> It
> wouldn't take a genius to think "Hmm, what would happen if I changed
> CFTREEITEMKEY to another value".
> The DLL is therfore programmed to only take in FORM values.
>
> Now I've broken the "Back" button because if someone clicks back
> while on
> the DLL page the go on to the page which submits as soon as it
> loads.
>
> However if I could get HTTP_REFERER I could do the following
>
> <Cfif FindNocase("finduserby",#HTTP.HTTP_REFERER#) NEQ 0>
> <Cfoutput>
> <body Class="BODY" onLoad="self.webform.submit()" >
> <FORM METHOD="POST" name="webform"
> Action="../DLLs/MonthlyRoster.dll/Show">
> <input type="hidden" name="id" value="#CFTREEITEMKEY#">
> <input type="hidden" name="STYLENAME" value="aims.css">
> <input type="hidden" name="debug" value="OFF">
> </FORM>
> </body>
> </cfoutput>
> <CFelse>
> <body onload="history.go(-1)" >
> <body>
> </body>
>
> in other words, I can use HTTP_REFERER to figure out what page I
> came from
> and where to go to.
> so if I come from the page with the CFTREE, then I submit the page
> on to the
> page with the DLL.
> Otherwise I must have come BACK from the DLL, therefor I'll trigger
> "history.go(-1)" and automatically go back to the CFTREE page.
>
>
> Hope you follow all this, now any suggestions?
>
> Regards
> Michael O'Reilly
> TransAer
>
>
>
>
>
> -----Original Message-----
> From: David Shadovitz [mailto:[EMAIL PROTECTED]]
> Sent: 07 July 2000 06:21
> To: [EMAIL PROTECTED]
> Subject: Re: REPOST: "Submitting" a page with a <cftree>
>
>
> It didn't slip by, it's just not clear what you want.
> Double-clicking a
> CFTREEITEM isn't supposed to submit the form. The form should have
> a
> submit button. If you want some action to occur without submitting
> the
> form, you can set the CFTREEITEM's HREF attribute.
> If double-clicking did in fact submit the form, HTTP_REFERER would
> be the
> page containing the CFTREE. You know what this page is, so why not
> use
> that name rather than HTTP_REFERER?
> -David
>
>
> On Thu, 6 Jul 2000 17:18:22 +0100 Michael O Reilly
> <[EMAIL PROTECTED]>
> writes:
> > Hi,
> > I'm re-posting this as it seem's to have slipped by everyone.
> >
> > I've been struggling with a problem for some time now and have
> > figured out a
> > way of solving it using HTTP_REFERER.
> > However this CGI var is only sent when a page is "Submitted".
> > Even though a CFTree must be within a CFForm, double-clicking on a
> > CFTreeItem doesn't seem to cause the page to be submitted.
> > Has anyone noticed/found a way round this?
> >
> > Regards
> > Michael O'Reilly
> > TransAer
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.