JScript silly question....

Results 1 to 3 of 3

Thread: JScript silly question....

  1. #1
    Loto Guest

    Default JScript silly question....

    Sorry, this is a beginnerĀ“s question, but it is driving me crazy!<BR>If I use "alert" to display the values of "letterA" and "letterB", I can see two different (or the same) letters,<BR>HOWEVER I get the error:<BR>OBJECT EXPECTED <BR>in the comparison: IF (letterA == letterB)<BR>(the field MyLetter is an INPUT field TYPE="text", maxlength="1")<BR><BR>THANKS A LOT!<BR><BR>&#060;SCRIPT LANGUAGE="JAVASCRIPT"&#062;<BR>function A() {<BR> var letterA;<BR> var letterB;<BR> var MyStr="TRWAGMYFPDXBNJZSQVHLCKE";<BR><BR> letterA = document.MyForm.MyLetter.value; <BR> letterB = MyStr.substring(7,8);<BR><BR> IF (letterA == letterB) <BR> alert ("FINALLY!!!");<BR>}<BR>&#060;/SCRIPT&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: JScript silly question....

    Are you missing a THEN, from an if..then statement?

  3. #3
    Richard A. Lowe Guest

    Default Not ASP Q., but....

    IF is case-sensitive (like the whole Jscript language)<BR><BR>if (a==b)<BR>// statements<BR>

Posting Permissions

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