www.webdeveloper.com
Results 1 to 13 of 13

Thread: Calculator Website

  1. #1
    Join Date
    Mar 2009
    Posts
    33

    Calculator Website

    Hi everyone,

    My friend and I develop a website for free calculator. The problem we encounter is that JS is not well displayed in IE. So if you can, please review this site

    www.iCalculator.net

    in Firefox. Please give me some suggestion/idea. We hope this site will be useful for students.

    If you can, could you review the JS code to tell me what is happening with IE? But that is no so much important, though. The JS file is

    www.iCalculator.net/js/iCalculator.js
    Last edited by catchicken; 03-23-2009 at 06:41 PM.

  2. #2
    Join Date
    Mar 2009
    Posts
    2
    I've seen ur web. Honestly, I like the way you design it. It looks familiar ) the same as my manual calculator. I like it.

    Good job!

  3. #3
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Couple of things to try:

    #1 - Add a doctype, suggest:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    #2 - Add the compatibility meta-tag as the first meta-tag:
    HTML Code:
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    54 68 65 42 65 61 72 4D 61 79

  4. #4
    Join Date
    Nov 2008
    Posts
    203
    What does it mean NAN, when I try to perform wrong operation.

  5. #5
    Join Date
    Mar 2009
    Posts
    10
    Help us find 13 errors in this code.
    help us find 13 errors in this code

    <html>
    <head>
    <title> JavaScript </title>
    <script type="text/javascript">
    var Favcolor
    favcolor=prompt("What is your favorite color? 1)Yellow, 2)Blue, or 3)Purple" , "Enter your choice number here");
    if(favcolor=1)
    {//yellow
    document.bgColor = '#ffff66';

    var info;
    info=("Where do you want the webmaster information? 1)top, or 2)bottom?" , "Enter your choice number here");
    if(info==1)
    {//infotop
    document.write("<h6 style=text-align:center;> Michelle Q. Crusader </h6>");
    document.write("<h6 style=text-align:center;>Last Updated: March 13, 2009 </h6>");
    }//infotop


    var fkind;
    fkind=prompt("What kind of font do you want? 1)Verdana in black, 2)Impact in blue, or 3)Courier in gray" , "Enter your choice number here");
    if(fkind==1)
    {//verdana
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose verdana and the color black as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose tigers!");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tigre1.jpg>");
    }//tiger1
    if(pnumber==2)
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//hor1
    if(place==2)
    {//vert1
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//vert1
    }//tiger2

    if(place==3)
    {//tiger3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//hor2
    if(place==2)
    {//vert2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//vert2
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love tigers! </h5>");
    }//piccaption
    }//pic1

    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:verdana;color:#000000> You chose elephants! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//hor3
    if(place==2)
    {//vert3
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>")
    }//vert3
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor4
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//hor4
    if(place==2)
    {//vert4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//vert4
    }//elephant3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:000000> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:verdana;color:#000000> You chose zebras! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor5
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//hor5
    if(place==2)
    {//vert5
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg>");
    }//vert5
    }//zebra2
    if(pnumber==3)
    {//zebra3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor6
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//hor6
    if(place==2)
    {//vert6
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg> <br>");
    document.write("<img src=zebra3.jpg>");
    }//vert6
    }//zebra3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//verdana

    if(fkind==2)
    {//impact
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose impact and the color blue as your font </h3>");
    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose tigers!</h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//thor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//thor1
    if(place==2)
    {//thor2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//thor2
    }//tiger2
    if(pnumber==3)
    {//tiger3

  6. #6
    Join Date
    Mar 2009
    Posts
    10
    please help us find 13 errors part 2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//thor3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//thor3
    if(place==2)
    {//thor4
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//thor4
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<style=font-family:impact;color:#0000ff> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor1
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//ehor1
    if(place==2)
    {//ehor2
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>");
    }//ehor2
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//ehor3
    if(place==2)
    {//ehor4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//ehor4
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3

    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");

    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//impact

    if(fkind==3)
    {//courier
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose courier and the color gray as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose tigers!</h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//tiger2
    if(pnumber==3)
    {//tiger3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//elephant2
    if(pnumber==3)
    {//elephant3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//courier

    if(info==2)
    {//infobottom
    document.write("<h6 style=text-align:center> Michelle Q. Crusader</h6>");
    document.write("<h6 style=text-align:center> Last Updated: March 13, 2009 </h6");
    }//infobottom
    }//yellow


    if(favcolor==2)
    {//blue
    document.bgColor = '#0066cc';

    var info;
    info=prompt("Where do you want the webmaster information? 1)top, or 2)bottom?" , "Enter your choice number here");
    if(info==1)
    {//infotop
    document.write("<h6 style=text-align:center;> Michelle Q. Crusader</h6>");
    document.write("<h6 style=text-align:center;>Last Updated: March 13, 2009 </h6>");
    }//infotop


    var fkind;
    fkind=prompt("What kind of font do you want? 1)Verdana in black, 2)Impact in blue, or 3)Courier in gray" , "Enter your choice number here");
    if(fkind==1)
    {//verdana
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose verdana and the color black as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose tigers!</h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//hor1
    if(place==2)
    {//vert1
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//vert1
    }//tiger2

    if(pnumber==3)
    {//tiger3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//hor2
    if(place==2)
    {//vert2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//vert2
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love tigers! </h5>");
    }//piccaption
    }//pic1

    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:verdana;color:#000000> You chose elephants! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//hor3
    if(place==2)
    {//vert3
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>")
    }//vert3
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor4

  7. #7
    Join Date
    Mar 2009
    Posts
    10
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//hor4
    if(place==2)
    {//vert4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//vert4
    }//elephant3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:verdana;color:#000000> You chose zebras! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor5
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//hor5
    if(place==2)
    {//vert5
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg>");
    }//vert5
    }//zebra2
    if(pnumber==3)
    {//zebra3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor6
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//hor6
    if(place==2)
    {//vert6
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg> <br>");
    document.write("<img src=zebra3.jpg>");
    }//vert6
    }//zebra3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//verdana

    if(fkind==2)
    {//impact
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose impact and the color blue as your font </h3>");
    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose tigers!</h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" "Enter your choice number here");
    if(place==1)
    {//thor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//thor1
    if(place==2)
    {//thor2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//thor2
    }//tiger2
    if(pnumber==3)
    {//tiger3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//thor3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//thor3
    if(place==2)
    {//thor4
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//thor4
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor1
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//ehor1
    if(place==2)
    {//ehor2
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>");
    }//ehor2
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//ehor3
    if(place==2)
    {//ehor4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//ehor4
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3

    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");

    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//impact

    if(fkind==3)
    {//courier
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose courier and the color gray as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose tigers!</h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//tiger2
    if(pnumber==3)
    {//tiger3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//tiger3

  8. #8
    Join Date
    Mar 2009
    Posts
    10
    help us part 3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//elephant2
    if(pnumber==3)
    {//elephant3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//courier

    if(info==2)
    {//infobottom
    document.write("<h6 style=text-align:center> Michelle Q. Crusader </h6>");
    document.write("<h6 style=text-align:center> Last Updated: March 13, 2009 </h6");
    }//infobottom

    }//blue



    if(favcolor==3)
    {//purple
    document.bgColor = '#9933cc';

    var info;
    info=prompt("Where do you want the webmaster information? 1)top, or 2)bottom?" , "Enter your choice number here");
    if(info==1)
    {//infotop
    document.write("<h6 style=text-align:center;> Michelle Q. Crusader </h6>");
    document.write("<h6 style=text-align:center;>Last Updated: March 13, 2009 </h6>");
    }//infotop


    var fkind;
    fkind=prompt("What kind of font do you want? 1)Verdana in black, 2)Impact in blue, or 3)Courier in gray" , "Enter your choice number here");
    if(fkind==1)
    {//verdana
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose verdana and the color black as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:Verdana;color:#000000> You chose tigers!</h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//hor1
    if(place==2)
    {//vert1
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//vert1
    }//tiger2

    if(pnumber==3)
    {//tiger3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//hor2
    if(place==2)
    {//vert2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//vert2
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love tigers! </h5>");
    }//piccaption
    }//pic1

    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:verdana;color:#000000> You chose elephants! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//hor3
    if(place==2)
    {//vert3
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>")
    }//vert3
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor4
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//hor4
    if(place==2)
    {//vert4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//vert4
    }//elephant3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:verdana;color:#000000> You chose zebras! </h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor5
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//hor5
    if(place==2)
    {//vert5
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg>");
    }//vert5
    }//zebra2
    if(pnumber=3)
    {//zebra3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//hor6
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//hor6
    if(place==2)
    {//vert6
    document.write("<img src=zebra1.jpg> <br>");
    document.write("<img src=zebra2.jpg> <br>");
    document.write("<img src=zebra3.jpg>");
    }//vert6
    }//zebra3


    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:verdana;color:#000000> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//verdana

  9. #9
    Join Date
    Mar 2009
    Posts
    10
    please help us part 4

    if(fkind==2)
    {//impact
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose impact and the color blue as your font </h3>");
    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose tigers!</h3>");


    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//thor1
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//thor1
    if(place==2)
    {//thor2
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg>");
    }//thor2
    }//tiger2
    if(pnumber==3)
    {//tiger3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//thor3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//thor3
    if(place==2)
    {//thor4
    document.write("<img src=tiger1.jpg> <br>");
    document.write("<img src=tiger2.jpg> <br>");
    document.write("<img src=tiger3.jpg>");
    }//thor4
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2

    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor1
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//ehor1
    if(place==2)
    {//ehor2
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg>");
    }//ehor2
    }//elephant2
    if(pnumber==3)
    {//elephant3
    var place;
    place=prompt("How do you want your pictures placed? 1) Horizontally, or 2) Vertically" , "Enter your choice number here");
    if(place==1)
    {//ehor3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//ehor3
    if(place==2)
    {//ehor4
    document.write("<img src=elephant1.jpg> <br>");
    document.write("<img src=elephant2.jpg> <br>");
    document.write("<img src=elephant3.jpg>");
    }//ehor4
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:impact;color:#0000ff> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3

    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");

    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:impact;color:#0000ff> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//impact

    if(fkind==3)
    {//courier
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose courier and the color gray as your font </h3>");

    var picture;
    picture=prompt("What kind of picture do you want? 1)Tigers, 2)Elephants, or 3)Zebras?" , "Enter your choice number here");
    if(picture==1)
    {//pic1
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose tigers!</h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//tiger1
    document.write("<img src=tiger1.jpg>");
    }//tiger1
    if(pnumber==2)
    {//tiger2
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    }//tiger2
    if(pnumber==3)
    {//tiger3
    document.write("<img src=tiger1.jpg>");
    document.write("<img src=tiger2.jpg>");
    document.write("<img src=tiger3.jpg>");
    }//tiger3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love tigers! </h5>");
    }//piccaption
    }//pic1
    if(picture==2)
    {//pic2
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose elephants! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//elephant1
    document.write("<img src=elephant1.jpg>");
    }//elephant1
    if(pnumber==2)
    {//elephant2
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    }//elephant2
    if(pnumber==3)
    {//elephant3
    document.write("<img src=elephant1.jpg>");
    document.write("<img src=elephant2.jpg>");
    document.write("<img src=elephant3.jpg>");
    }//elephant3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love elephants! </h5>");
    }//piccaption

    }//pic2
    if(picture==3)
    {//pic3
    document.write("<h3 style=font-family:courier;color:#cccccc> You chose zebras! </h3>");

    var pnumber;
    pnumber=prompt("How many pictures do you want? 1)one, 2)two, or 3)three?" , "Enter your choice number here");
    if(pnumber==1)
    {//zebra1
    document.write("<img src=zebra1.jpg>");
    }//zebra1
    if(pnumber==2)
    {//zebra2
    document.write("<img src=zebra1.jpg>");
    document.write("<img src=zebra2.jpg>");
    }//zebra2
    if(pnumber==3)
    {//zebra3
    document.write("img src=zebra1.jpg");
    document.write("<img src=zebra2.jpg>");
    document.write("<img src=zebra3.jpg>");
    }//zebra3

    var piccaption;
    piccaption=prompt("Do you want a caption for your pictures? 1)yes, or 2)no" , "Enter your choice number here");
    if(piccaption==1)
    {//piccaption
    document.write("<h5 style=font-family:courier;color:#cccccc> I love zebras! </h5>");
    }//piccaption
    }//pic3
    }//courier

    if(info==2)
    {//infobottom
    document.write("<h6 style=text-align:center> Webmaster Michelle Q. Crusader </h6>");
    document.write("<h6 style=text-align:center> Last Updated: March 13, 2009 </h6");
    }//infobottom

    }//purple

    </head>

    </html>

  10. #10
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,114

    Nice job

    I like it!

    I can't remember the one my son uses... he has some kind of online calculator he always uses. I'll have to show him yours.

    Really cool.
    Kudos.

  11. #11
    Join Date
    May 2008
    Posts
    21
    I have been getting problems calculating sine with Javascript. As a test, I tried making a script that would make a tiny div go in circles, but it was very choppy. I found out that it wasn't actually calculating sine properly. I checked your calculator and it wasn't either. sin(12) on your calculator = -0.53657291800043, whereas my Microsoft Calculator returns 0.20791169081.

  12. #12
    Join Date
    Mar 2009
    Posts
    33
    The problem with sine is that the PHP code calculates it in Radian. So you can check sin(pi/2)=1, sin(0)=0 and sin(pi)=0.

    Should I change this to normal deg? Or I use radian for sine? This is only an issue of convention, and I can change the code immediately.

  13. #13
    Join Date
    Oct 2007
    Location
    Sweden
    Posts
    225
    You should make it possible to choose between rad or deg.
    Another thing that might come in handy is good keyboard support.
    An "ANS" key, to add your last calculation value to your current could also be a nice feature.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles