This is my assignment, but I don\'t know why don\'t it work ask for rule . Pleas
ID: 3595939 • Letter: T
Question
This is my assignment, but I don't know why don't it work ask for rule . Please help me to change. Thanks ask Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. This my work <!-- 27th september 2017 Project 2 - Game v0.2. CMPt --!> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Life Game (T^T) </title> <Style> body { Background-color: #56b896; Background-size: 100% 100%; } </Style> </head> <body> <h1>Life Game (T^T) </h1> <script> function btnNorth() { document.getElementById("message").value="you cut through the courtyard, past the empty granite benches, where you'd met your lover!"; } function btnSouth() { document.getElementById("message").value="you lose your life by a accident"; } function btnEast() { document.getElementById("message").value="you get a lot of wealth, then you get the world"; } function btnWest() { document.getElementById("'message").value="wake up , it is only a game"; } </script> <br/> <textarea readonly id="message" name="message" rows="50" cols="50"> If you do not choose, your life won’t advance, but here is only a game. </textarea> <br/> <button type="button">North</button> <button type="button">South</button> <button type="button">East</button> <button type="button">West</button> <br/> <p> Life is a game all people are players or prayers you want to attend the party please touch <a href="mailto:shun.dong1@marist.edu"> here.</p> </body> </html> Thanks This is my assignment, but I don't know why don't it work ask for rule . Please help me to change. Thanks ask Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. This my work <!-- 27th september 2017 Project 2 - Game v0.2. CMPt --!> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Life Game (T^T) </title> <Style> body { Background-color: #56b896; Background-size: 100% 100%; } </Style> </head> <body> <h1>Life Game (T^T) </h1> <script> function btnNorth() { document.getElementById("message").value="you cut through the courtyard, past the empty granite benches, where you'd met your lover!"; } function btnSouth() { document.getElementById("message").value="you lose your life by a accident"; } function btnEast() { document.getElementById("message").value="you get a lot of wealth, then you get the world"; } function btnWest() { document.getElementById("'message").value="wake up , it is only a game"; } </script> <br/> <textarea readonly id="message" name="message" rows="50" cols="50"> If you do not choose, your life won’t advance, but here is only a game. </textarea> <br/> <button type="button">North</button> <button type="button">South</button> <button type="button">East</button> <button type="button">West</button> <br/> <p> Life is a game all people are players or prayers you want to attend the party please touch <a href="mailto:shun.dong1@marist.edu"> here.</p> </body> </html> Thanks ask Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. Starting with the work we've done in class, begin a new project which we'll use throughout the rest of the semester. Initial requirements: Display the title of your game on the game page. Put a mailto: link on the game page so I can email you if I get stuck Your game must have at least four (4) different locations. Display the text for the starting location of your game in a textarea. Implement four buttons: North, South, East, and West. Each will take the player to a different location in your game. Display the text (in the textarea) for each location as you move there. Write one event handler function for each button. In each function: Declare a variable called message Initialize message to a string of descriptive text which describes the location in your game to which that button takes you. Write a function to display the message in the textarea when you call it, passing message as a parameter. This my work <!-- 27th september 2017 Project 2 - Game v0.2. CMPt --!> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Life Game (T^T) </title> <Style> body { Background-color: #56b896; Background-size: 100% 100%; } </Style> </head> <body> <h1>Life Game (T^T) </h1> <script> function btnNorth() { document.getElementById("message").value="you cut through the courtyard, past the empty granite benches, where you'd met your lover!"; } function btnSouth() { document.getElementById("message").value="you lose your life by a accident"; } function btnEast() { document.getElementById("message").value="you get a lot of wealth, then you get the world"; } function btnWest() { document.getElementById("'message").value="wake up , it is only a game"; } </script> <br/> <textarea readonly id="message" name="message" rows="50" cols="50"> If you do not choose, your life won’t advance, but here is only a game. </textarea> <br/> <button type="button">North</button> <button type="button">South</button> <button type="button">East</button> <button type="button">West</button> <br/> <p> Life is a game all people are players or prayers you want to attend the party please touch <a href="mailto:shun.dong1@marist.edu"> here.</p> </body> </html> <!-- 27th september 2017 Project 2 - Game v0.2. CMPt --!> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Life Game (T^T) </title> <Style> body { Background-color: #56b896; Background-size: 100% 100%; } </Style> </head> <body> <h1>Life Game (T^T) </h1> <script> function btnNorth() { document.getElementById("message").value="you cut through the courtyard, past the empty granite benches, where you'd met your lover!"; } function btnSouth() { document.getElementById("message").value="you lose your life by a accident"; } function btnEast() { document.getElementById("message").value="you get a lot of wealth, then you get the world"; } function btnWest() { document.getElementById("'message").value="wake up , it is only a game"; } </script> <br/> <textarea readonly id="message" name="message" rows="50" cols="50"> If you do not choose, your life won’t advance, but here is only a game. </textarea> <br/> <button type="button">North</button> <button type="button">South</button> <button type="button">East</button> <button type="button">West</button> <br/> <p> Life is a game all people are players or prayers you want to attend the party please touch <a href="mailto:shun.dong1@marist.edu"> here.</p> </body> </html> ThanksExplanation / Answer
Hi there,
I have done some minor changes to your code.In your code, the West button on clicking was not displaying text inside the textarea because you have single quotes extra inside the function related to west button. Please find the corrected code below.If you still have any queries you can comment in the comment section.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Life Game (T^T) </title>
<Style>
body {
Background-color: #56b896;
Background-size: 100% 100%;
}
</Style>
</head>
<body>
<h1>Life Game (T^T) </h1>
<script>
function btnNorth() {
document.getElementById("message").value="you cut through the courtyard, past the empty granite benches, where you'd met your lover!";
}
function btnSouth() {
document.getElementById("message").value="you lose your life by an accident";
}
function btnEast() {
document.getElementById("message").value="you get a lot of wealth, then you get the world";
}
function btnWest() {
document.getElementById("message").value="wake up , it is only a game";
}
</script>
<br/>
<textarea readonly id="message"
name="message"
rows="30"
cols="30"> If you do not choose, your life won’t advance, but here is only a game.
</textarea>
<br/>
<button type="button">North</button>
<button type="button">South</button>
<button type="button">East</button>
<button type="button">West</button>
<br/>
<p> Life is a game all people are players or prayers you want to attend the party please touch <a href="mailto:shun.dong1@marist.edu"> here.</p>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.