Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Dec 2003
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nothins happenin

    hey, i just made this script but it isn't working

    <script>

    var name=prompt("what's yo name?");
    alert(name + "is a decent name, its almost as cool as Bob, but not quite);
    alert("Sup " + name + "? It just doesn't have that ring to it...");
    alert("Oh well...")

    </script>

    someone please help me

  • #2
    New Coder
    Join Date
    Jan 2004
    Location
    watertown,SD
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just missed the " after quite

    <html>
    <title>test</title>

    <script>

    var name=prompt("what's yo name?");
    alert(name + " is a decent name, its almost as cool as Bob, but not quite");
    alert("Sup " + name + "? It just doesn't have that ring to it...");
    alert("Oh well...")

    </script>

    </html>

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    Georgia
    Posts
    306
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The script gingerGamgee gave you works fine but he forgot to add ; at the end of the last alert and script lang defier so here u go




    <html>
    <title>test</title>

    <script language="javascript">

    var name=prompt("what's yo name?");
    alert(name + " is a decent name, its almost as cool as Bob, but not quite");
    alert("Sup " + name + "? It just doesn't have that ring to it...");
    alert("Oh well...");

    </script>

    </html>
    ~Designer's Toolz~

  • #4
    New Coder
    Join Date
    Dec 2003
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks! I just get so mad when i mess up little things like that...

    I just have one more question, when it asks your name it has "undefined" already in there, is there any way to remove that so it is just an empty box?
    Last edited by the_bob; 01-16-2004 at 01:19 PM.

  • #5
    Regular Coder
    Join Date
    Apr 2003
    Location
    Atlanta, GA
    Posts
    487
    Thanks
    0
    Thanked 0 Times in 0 Posts
    prompt("Question?", "Default answer.");

  • #6
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by DsgnrsTLZAdmin
    The script gingerGamgee gave you works fine but he forgot to add ; at the end of the last alert
    While it is a good practice to terminate statements with semicolons, it is not required in JavaScript (unless you have two statements on the same line, of course).
    Last edited by fredmv; 01-17-2004 at 07:26 PM.

  • #7
    New Coder
    Join Date
    Dec 2003
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks again, everyone!


  •  

    Posting Permissions

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