3 Replies Latest reply on Sep 20, 2007 8:08 AM by SymTsb

    equal to a blank in the xml

    Level 7
      This is a multi-part message in MIME format.

      ------=_NextPart_000_0006_01C7FADF.0E2C3E20
      Content-Type: text/plain;
      charset="iso-8859-1"
      Content-Transfer-Encoding: quoted-printable

      The following is reading an xml file.
      I have the following code and works fine if floorplan[p] is not equal to =
      the word Null.
      How would like to keep that but add to the following code if =
      floorplan[p] equals a blank as in the xml, then largerpdf._visible =3D =
      false; ?

      This is what I mean by a blank in the xml: <floorplan></floorplan>=20

      this.onEnterFrame =3D function() {
      if(floorplan[p] !=3D "Null") {
      largerpdf._visible =3D true;
      }else {
      largerpdf._visible =3D false;
      }

      Thanks
      Joe T
      ------=_NextPart_000_0006_01C7FADF.0E2C3E20
      Content-Type: text/html;
      charset="iso-8859-1"
      Content-Transfer-Encoding: quoted-printable

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD>
      <META http-equiv=3DContent-Type content=3D"text/html; =
      charset=3Diso-8859-1">
      <META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
      <STYLE></STYLE>
      </HEAD>
      <BODY>
      <DIV><FONT face=3DArial size=3D2>The following is reading an xml=20
      file.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>I have the following code and =
      works fine if=20
      floorplan[p] is not equal to the word Null.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>How would like to keep that =
      but add=20
      to the following code if floorplan[p] equals a blank as in the =

      xml, then largerpdf._visible =3D false; ?</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial><FONT size=3D2><SPAN class=3Dm>This is what I =
      mean by a blank=20
      in the xml: &lt;</SPAN><SPAN class=3Dt>floorplan</SPAN><SPAN=20
      class=3Dm>&gt;</SPAN><SPAN class=3Dm>&lt;/</SPAN><SPAN =
      class=3Dt>floorplan</SPAN><SPAN=20
      class=3Dm>&gt;</SPAN> <BR></FONT></FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>this.onEnterFrame =3D function() =
      {<BR> =20
      if(floorplan[p] !=3D "Null") =
      {<BR>    largerpdf._visible =3D=20
      true;<BR>    }else =
      {<BR>  largerpdf._visible =3D=20
      false;<BR>}</FONT></DIV><FONT face=3DArial>
      <DIV><BR><FONT size=3D2>Thanks</FONT></DIV>
      <DIV><FONT size=3D2>Joe T</FONT></FONT></DIV></BODY></HTML>

      ------=_NextPart_000_0006_01C7FADF.0E2C3E20--

        • 1. Re: equal to a blank in the xml
          SymTsb Level 2
          this.onEnterFrame =3D function() {
          if(floorplan[p] !=3D "Null") {
          largerpdf._visible =3D true;
          }else {
          largerpdf._visible =3D false;
          }

          not proper AS1/2/3 at all....

          this.onEnterFrame = function() {
          if(floorplan[p] != null) {
          largerpdf._visible = true;
          } else {
          largerpdf._visible = false;
          }
          • 2. Re: equal to a blank in the xml
            Level 7
            Correct me if I'm wrong, but the word "Null" in the xml is treated
            differently than a blank in the xml. Right?
            I am trying to add to the code the fact that there is a blank in the xml.
            And if floorplan[p] equals a blank than this should happen:
            largerpdf._visible = false;
            This is what I mean by a blank in the xml: <floorplan></floorplan>

            this.onEnterFrame = function() {
            if(floorplan[p] != "Null") {
            largerpdf._visible = true;
            }else {
            largerpdf._visible = false;
            }

            Thanks
            Joe T

            • 3. Re: equal to a blank in the xml
              SymTsb Level 2
              Then you need to test if the current nodes value is equal to "". The value of the node is treated as text so it can be tested like any String.