4 Replies Latest reply on Dec 8, 2006 12:26 PM by Newsgroup_User

    Should be an easy one..IsDefined OR

    Level 7
      I am trying to have my page check to see if there is a defined variable OR
      if a button is clicked to trigger an event. It doesnt seem to be working.

      <cfif IsDefined ('Get_Student') OR #Student#>

      IS that right?


        • 1. Re: Should be an easy one..IsDefined OR
          Level 7
          Wally,

          Right now you are not really saying anything complete. What is Get_Student
          and what is #Student#?

          Kim

          "Wally Kolcz" <wkolcz@softproofs.com> wrote in message
          news:elbogb$4vb$1@forums.macromedia.com...
          >I am trying to have my page check to see if there is a defined variable OR
          >if a button is clicked to trigger an event. It doesnt seem to be working.
          >
          > <cfif IsDefined ('Get_Student') OR #Student#>
          >
          > IS that right?
          >


          • 2. Re: Should be an easy one..IsDefined OR
            Level 7
            Get_Student is a button and #Student# is a variable.


            • 3. Re: Should be an easy one..IsDefined OR
              Level 7
              > I am trying to have my page check to see if there is a defined variable OR
              > if a button is clicked to trigger an event. It doesnt seem to be working.

              When you say "event", I presume you are talking about a Javascript (CLIENT
              SIDE) event? How is CF supposed to know what's happening on the client
              browser?

              What are you wanting to happen as an event handler?

              --
              Adam
              • 4. Re: Should be an easy one..IsDefined OR
                Level 7
                Ok, but then what you are saying is IF button is defined or variable.

                Then what?

                <CFIF> statments say If A is defined do this if not do B.

                And, I don't think you can see if a button is defined. Its a button. If the
                Get_Student is a submit button then you can check for that
                <CFIF IsDefined("Get_Student.Submit") or #Student# EQ "something">
                Then do this.
                </CFIF>

                Kim

                "Wally Kolcz" <wkolcz@softproofs.com> wrote in message
                news:elc5sg$kif$1@forums.macromedia.com...
                > Get_Student is a button and #Student# is a variable.
                >