469,647 Members | 1,800 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

How to get this Javascript Movie Qoute Quiz???

1
Hii this is my first question here. Hope you will help me.

I found a script to a movie quote quiz that I would like to post on my website.

The quiz I want to use can be found at :

http://www.s-anand.net/Movie_quote_quiz.html


It has this smart function that the correct answer will turn to green in the box.

Can you give me the exact code so I only need to change the movie quotes and the answer.

thanks
Yaso
Nov 8 '06 #1
1 1333
vee10
141 100+
hi,
i think this is solution for ur problem

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head runat="server">
  3.     <title>Untitled Page</title>
  4.     <script type="text/javascript">
  5.     function changecolor(color)
  6.      {
  7.  
  8.      if(color==1)
  9.      {
  10.       if(document.form1.text1.value=="Apple")
  11.         document.form1.text1.style.color="green";
  12.         else document.form1.text1.style.color="black";
  13.      }  
  14.      else if(color==2)
  15.      {
  16.       if(document.form1.text2.value=="Grapes")
  17.         document.form1.text2.style.color="green";
  18.         else document.form1.text2.style.color="black";
  19.      }
  20.      }
  21.  
  22.     </script>
  23. </head>
  24. <body>
  25.     <form id="form1" runat="server">
  26.     <div>
  27.            <input type="text" name="text1" onchange="changecolor(1);"  />&nbsp;
  28.            <input type="text" name="text2" onchange="changecolor(2);"  />&nbsp;
  29.     </div>
  30.     </form>
  31. </body>
  32. </html>
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  













Hii this is my first question here. Hope you will help me.

I found a script to a movie quote quiz that I would like to post on my website.

The quiz I want to use can be found at :

http://www.s-anand.net/Movie_quote_quiz.html


It has this smart function that the correct answer will turn to green in the box.

Can you give me the exact code so I only need to change the movie quotes and the answer.

thanks
Yaso
Nov 9 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.