Results 1 to 2 of 2

Thread: Easy Javascript one

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Easy Javascript one

    Code:
    if (formObj.elements("txtName").value == "") || 
    (toUpperCase(formObj.elements("txtName").value) != "TEST USER")
    Note the above is on 1 line in my page. I'm trying to check if
    a) the textbox has an entry
    b) if it says test user

    The formobj bit is okay too - that's a document.formname variable.
    What's wrong with the above syntax please ?!?!?

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    i think your problem is your ()

    try this

    if (formObj.elements("txtName").value == "" ||
    toUpperCase(formObj.elements("txtName").value) != "TEST USER")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width