Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By SurfMan

Thread: Javascript - Alert box

  1. #1
    san1 is offline Member
    Join Date
    Feb 2014
    Posts
    9
    Rep Power
    0

    Default Javascript - Alert box

    Hi,


    I've been trying to execute the following code, but the alert box does not appear. Appreciate any inputs:

    <form name="selectForm">
    <select multiple name="alphabetTypes" size="5">
    <option> A </option>
    <option> B </option>
    <option> C </option>
    <option> D </option>
    <option> E </option>
    </select>
    <input type="button" value="Select" onclick="alert ('Number of options selected: ' + howMany(document.selectForm.alphabetTypes))">
    </form>

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: Javascript - Alert box

    javascript != java
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,703
    Rep Power
    5

    Default Re: Javascript - Alert box

    a) install firefox
    b) use its awesome developer tools to see what javascript error you are getting
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    927
    Rep Power
    2

    Default Re: Javascript - Alert box

    Quote Originally Posted by Norm View Post
    javascript != java
    In Javascript, the most accurate expression would be JavaScript !== Java :D
    gimbal2 likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,703
    Rep Power
    5

    Default Re: Javascript - Alert box

    Quote Originally Posted by SurfMan View Post
    In Javascript, the most accurate expression would be JavaScript !== Java :D
    That deserves a free beer.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 0
    Last Post: 03-20-2014, 08:40 PM
  2. How do I ignore an alert?
    By kkid in forum NetBeans
    Replies: 4
    Last Post: 11-09-2012, 12:42 PM
  3. Javascript Alert
    By mutuah in forum New To Java
    Replies: 4
    Last Post: 03-25-2010, 05:28 PM

Posting Permissions

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