>- see footer for list info -<
the problem is you're mixing your client and server coding.  the last segment 
of this will execute before the javascript gets rendered in the client:
<cfif blnLogout>
        <cflocation addtoken="No" url="index.cfm?fuseaction=sso.logout">
</cfif>

you're basically setting a CF variable to true, then asking the user to confirm 
something, then based on their input redirecting them back with javascript, but 
all that means nothing as you're then forcing a redirect to the logout anyway, 
if that CF variable is true.


Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 29/11/2005 14:23:19 >>>
>- see footer for list info -<
I have a simple teplate (below) that is behaving oddly.

The javascript does not run unless I put a cfabort after the closing
script tag. I thought it may be the cflocation tag so I replaced it
with a javascript location.href effort to no avail.

Any pointers?

<cfset blnLogout = false>
<cfif attributes.order_email_address eq attributes.user_email_address>
  <cfset blnLogout = true>
    <script language="JavaScript">
      input_box=confirm("Are you sure you want to change your login
details?\n\nIf you select 'OK' you will be logged out, you will then
need to login again using the new email address.\n\nYour password will
NOT change");
      if (input_box==true) {
        // email will be changed.
      } else {
         location.href="javascript:history.go(-1)";
      }
    </script>
</cfif>


   <cfstoredproc>

        <!--- SNIP SNIP SNIP --->       

        
    </cfstoredproc>
                
<cfif blnLogout>
        <cflocation addtoken="No" url="index.cfm?fuseaction=sso.logout">
</cfif>
_______________________________________________

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 -<


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed and 
should not be disclosed to any other party. 
If you have received this email in error please notify your system manager and 
the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: +44 (0) 1592 414141
**********************************************************************
_______________________________________________

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