please could you help me!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: please could you help me!!

  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Unhappy please could you help me!!

    could anyone of you smashing people tell me why this piece of code don't work??
    thanks.

    HTML>
    <HEAD>
    <TITLE>another go </TITLE>
    <SCRIPT SRC=stringLibaryTMA.js> </SCRIPT>
    <SCRIPT>

    function isVowel(aCharacter)
    /************************************************************************/
    /* This function takes one argument, a string which consists of a */
    /* single character. The function returns the Boolean value true if */
    /* the character is one of a, A, e, E, i, I, o, O, u, or U. If the */
    /* character is not one of these the function returns the Boolean value */
    /* false */
    /************************************************************************/
    {
    return
    ((aCharacter == 'a') ||
    (aCharacter == 'A')||
    (aCharacter == 'e') ||
    (aCharacter == 'E')||
    (aCharacter == 'i') ||
    (aCharacter == 'I')||
    (aCharacter == 'o') ||
    (aCharacter == 'O')||
    (aCharacter == 'u') ||
    (aCharacter == 'U'))
    };
    {
    isVowel()
    var letter;
    letter = window.prompt('enter','');
    if (letter == 'isVowel')
    {
    document.write('true')
    }
    else
    {
    document.write('false')
    }
    };
    </SCRIPT>
    </HEAD>
    <BODY>
    </BODY>
    </HTML>

  2. #2
    Join Date
    May 2004
    Location
    Durham, UK
    Posts
    174
    Hi,

    this version seems to work.

    <HTML>
    <HEAD>
    <TITLE>another go </TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    {
    function isVowel(aCharacter)
    {
    return(
    ((aCharacter == 'a') ||
    (aCharacter == 'A')||
    (aCharacter == 'e') ||
    (aCharacter == 'E')||
    (aCharacter == 'i') ||
    (aCharacter == 'I')||
    (aCharacter == 'o') ||
    (aCharacter == 'O')||
    (aCharacter == 'u') ||
    (aCharacter == 'U')));
    };
    }

    {
    var letter;
    letter = window.prompt('enter','');
    if (isVowel(letter))
    {
    document.write('true')
    }
    else
    {
    document.write('false')
    }
    };

    </script>
    </HEAD>

    <BODY>
    </BODY>
    </HTML>


    Enjoy.
    Hope this helps
    Graham

    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, and if they get mad, you are a mile away and you have their shoes ;-)

    http://www.grahamrobinsonsoftware.com

  3. #3
    Join Date
    Jul 2004
    Posts
    2

    Smile

    thanks lads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center