Javascript cannot the ColdFusion <cfset> portion of your code based upon
your Javascript conditional logic.  Your example will not work and jake was
trying to show you a Javascript way.  If the closeboxflag is a form element,
it would be fire some sort of Javascript event to perform what you are
trying to do or perhaps update a hidden form field that will be processed by
a ColdFusion action page.

Teddy

On 9/25/06, Jonathan Hicks <[EMAIL PROTECTED]> wrote:
>
> what i'm trying to do is a check from the user.  if the user clicks ok,
> then a database update is completed, or if the user clicks cancel, nothing
> should happen.  i was trying to set closeboxflag2 to true so that:
>
> <cfif closeboxflag2 eq "true">
> //perform database update
> <cfelse>
> //do nothing
> </cfif>
>
> hope that makes sense, thanks for the help!
>
>
> >I'm not sure where you are trying to reference closeboxflag2 from but
> >from the looks of your code, you are mixing things that shouldn't be
> >mixed.  The following works:
> >
> ><script language="javascript" type="text/javascript">
> >            var closeboxflag = false;
> >            var closeboxflag = "";
> >            closeboxflag = confirm("Are you sure you want to close?")
> >            if (closeboxflag == true) {
> >              closeboxflag2 = "true";
> >            } else {
> >              closeboxflag2 = "false";
> >            }
> >    </script>
> >
> >Jonathan Hicks wrote:
> >>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254089
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to