Results 1 to 3 of 3

Thread: score??

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    score??

    hi,
    I ask ten maths questions ..for each correct answer I want my script write 1 point..( on the same page)I mean I need a score board telling visitors how many they did correctly...how can I manage this?..(javascript)

    thanks

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    You could alter the properties of a text box, changing the way it looks and also saving the value to that text box.

    ?

  3. #3

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    ý need a score board

    hi my friend,
    if u can add some more scripts to the foolowings so that I have a scorebord..i will be gratefull to you
    thanks.. for every correct answer let it .write.1 point..
    thanks

    <html>
    <head>
    <style>
    #zz{background-color:green;position:absolute;top:120;left:95;width:50px;height:60px;}
    #mm{background-color:black;position:absolute;top:120;left:200;width:45px;height:60px;}
    #vv{background-color:gold;position:absolute;top:120;left:150;width:50px;height:60px;}
    #qq{background-color:gold;position:absolute;top:120;left:250;width:45px;height:60px;}
    #son{background-color:azure;position:absolute;top:120;left:300;width:50px;height:60px;}
    #big{background-color:brown;position:absolute;top:20;left:80;width:350px;height:360px;z-index:1}
    </style>
    </head>
    <body bgcolor="pink">
    <center>
    <div id="big" align=center>

    <script language="javascript">
    red=Math.floor(Math.random()*20)+1
    document.write("<div id='zz'><h1><font color=red>",+red+"</div>")
    blue=Math.floor(Math.random()*20)+1
    document.write("<div id='mm'><h1><font color=blue>",+blue+"</div>")
    document.write("<div id='qq'>=</div>")
    document.write("<div id='vv'>+</div>")
    var dogr=(red+blue)

    var ans=prompt(+red+"...and..."+blue+"..is..","the answer.. is==")
    if(ans==(blue+red))
    {
    document.write("good--job--","the--answer..is..",dogr)
    document.write("<br>try again..8=))")
    document.write("<div id='son'>",+dogr+"</div>")

    }
    else
    {
    document.write("SORRY","-the--answer..IS.=",dogr)
    document.write("<div id='son'>",+dogr+"</div>")

    document.bgColor="black"
    document.write("<br>try again...8=((")
    }
    </script>
    </div>
    </body>
    </html>

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