home *** CD-ROM | disk | FTP | other *** search
/ Magazyn WWW 1999 July / www_07_1999.iso / prez / amiga / KidHTML1_25.lha / KidHTML1.25 / Script / roomsise.js < prev    next >
Text File  |  1998-08-25  |  2KB  |  76 lines

  1.  
  2.  
  3. <!-- TWO STEPS TO INSTALL ROOM SIZE CALCULATOR:
  4.  
  5.    1.  Paste the specified coding into the HEAD of your HTML document
  6.    2.  Put the last code into the BODY of your HTML document  -->
  7.  
  8. <!-- STEP ONE: Copy this code into the HEAD your HTML document  -->
  9.         
  10. <HEAD>
  11.  
  12. <SCRIPT LANGUAGE="JavaScript">
  13. <!-- Original:  Motivational Marketing Associates
  14.  
  15. <!-- This script and many more are available online from -->
  16. <!-- The JavaScript Source!! http://javascriptsource.com -->
  17.  
  18. <!-- Begin
  19. function ClearInput(form) {
  20. form.attendance.value="";
  21. form.banquet60.value="";
  22. form.banquet72.value="";
  23. form.theater.value="";
  24. form.school18.value="";
  25. form.school30.value="";
  26. form.reception.value="";
  27. form.trade8.value="";
  28. form.trade10.value="";
  29. return true;
  30. }
  31. function help(helponwhat) {
  32. if (helponwhat == "attendance")
  33. alert("Enter the number of people who will be attending your event.")
  34. }
  35.  function SizeCalc(form) {
  36. var banquet60 = 0;
  37. var banquet72 = 0;
  38. var theater = 0;
  39. var school18 = 0;
  40. var school30 = 0;
  41. var reception = 0;
  42. var trade8 = 0;
  43. var trade10 = 0;
  44. if (form.attendance.value==null||form.attendance.value.length==0){
  45. alert("Please enter the number of people attending.");
  46. return false;
  47. }
  48. else
  49. attendance = form.attendance.value
  50. form.banquet60.value = attendance * 12;
  51. form.banquet72.value = attendance * 12.05;
  52. form.theater.value = attendance * 9;
  53. form.school18.value = attendance * 14.5;
  54. form.school30.value = attendance * 17.5;
  55. form.reception.value = attendance * 9.5;
  56. form.trade8.value = attendance * 160;
  57. form.trade10.value = attendance * 200;
  58. return true;
  59. }
  60. // End -->
  61. </SCRIPT>
  62.  
  63. <!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
  64.  
  65. <BODY>
  66.  
  67. <CENTER>
  68. <FORM NAME="room" METHOD="post">
  69. <TABLE BORDER>
  70. <TR>
  71. <TD COLSPAN=8 ALIGN=CENTER>
  72. <B>Number of people or exhibition booths</B> <INPUT TYPE="text" name="attendance" SIZE=8></TD>
  73. </TR>
  74. <TR><TD COLSPAN=8 ALIGN=CENTER>
  75. <INPUT TYPE="button" valu
  76.