Can some please help with Programming class

Hi i am writing this message because i am new to programming and i am taking a CIS class Web Programming with javascript and am struggling in it pretty bad. I was wondering if someone would be generous enough to help me through some assignments i would greatly appriciate it.

Comments

  • : Hi i am writing this message because i am new to programming and i am taking a CIS class Web Programming with javascript and am struggling in it pretty bad. I was wondering if someone would be generous enough to help me through some assignments i would greatly appriciate it.
    :

    Hi

    Post what you need and if some one can help will anwser you.
  • : : Hi i am writing this message because i am new to programming and i am taking a CIS class Web Programming with javascript and am struggling in it pretty bad. I was wondering if someone would be generous enough to help me through some assignments i would greatly appriciate it.
    : :
    :
    : Hi
    :
    : Post what you need and if some one can help will anwser you.
    :

    Hi thanks for responding i appriciate it:
    Ok i need to create a webpage that allows users to play a guessing game using the Math object to assign a random number to a variable.
    I know i have to use this formula (Math.round(Math.random() *100);)
    Ok but then i must create a text box which the user can type the number, along with a command button named Guess. I must write a timeout that asks users if they want to stop the game if they do not press the Guess button within 10 seconds. If the user selects Ok, close the web browser window. If the user decides to contiue(by pressing the cancel button), then restart the game and the timeout.
    I have no idea how to do this part can someone please help!


  • Hi

    The html file i use its called Teste3.html :

    [code]


    Teste3

    var aa = Math.round(Math.random() * 100);
    var TimeOut = window.setTimeout("HandleTimeOut()", 10000);

    function HandleTimeOut()
    {
    var UserConf = confirm("End Game ???");

    if (UserConf)
    {
    window.opener = self;
    self.close();
    }
    else
    window.navigate("Teste3.html");
    }

    function HandleClick()
    {
    window.clearTimeout(TimeOut);

    if (UserNum.value < aa)
    HintDiv.innerText = "Your number is smaller.";

    if (UserNum.value > aa)
    HintDiv.innerText = "Your number is bigger.";

    if (UserNum.value == aa)
    HintDiv.innerText = "Your number is equal.";

    TimeOut = window.setTimeout("HandleTimeOut()", 10000);
    }








    [/code]
    In here "window.navigate("Teste3.html");" you have to change the
    "Teste3.html" to the name of your html file.

    Hope it helps.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion