28 users online (1 members and 27 guests)  


  Results 1 to 3 of 3

Related

  1. GET and POST methods    Forum: PHP Forum
    Replies: 3
  2. Equal Cell Legths    Forum: HTML Forum
    Replies: 3
  1. #1
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652

    NOT EQUAL methods??

    Is there an easier, more direct method of coding a NOT EQUAL condition. As it is, I use

    if (typ == "noj") { fill = "mall" }
    else { document.write("<SCRIPT language='JavaScript'>end()</SCRIPT>");


    in order to place an ending menu when the passed parameter IS NOT EQUAL TO 'noj'. The 'fill' paramater in the above is ignored - meaning only the 'else' condition actually writes anything. Is that the most efficient way to write when 'noj' is not present?

  2. #2
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    What about:

    if (typ != "noj")
    {
    document.write("<SCRIPT language='JavaScript'>end()</SCRIPT>");
    }

    Disclaimer: It's been awhile since I've done any JavaScripting.

  3. #3
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Yes, merci beaucoup! That != is what I was looking for - not having found it on page 81 in Danny Goodman's JavaScript Bible - because, naturally, it was in the index under != but not under does not equal, not equal or unequal -- needless to say I've added those references but may never need them again now that it may be burned into my recall memory permanently.



Tags for this Thread