HTML switch case break problem in Developer Help
|
|
Code:
<head> <title>About the Wolves</title> <body bgcolor="silver"> <script type="text/javascript" language="JavaScript">
function menuAction(menu) { switch(menu.options[menu.selectedIndex].value) {
case "cmd1": document.title = "The Message Board";
var body2 = "<br>"+ "<center><table border=\"1\">"+ "<tr>"+ "<td>Messages:<br>"+ "</tr>"+ "<tr>"+ "<td>Try to make 500,000$ for the alliance per day<br>"+ "Dont take more then your ranking would allow(check rankings page)<br>"+ "Comments from shwb1: Bark1 to me :P<br>"+ "<br>"+ "The only one who can edit the den is me and flare at the moment<br>"+ "<br>"+ "Dear flare,<br>"+ "There is a new way of editing the den it is a bit complex but it provides us with easy way of<br>"+ "getting around when i get on please ask me about it i will tell you<br>"+ "~Love shwb1<br>"+ "PS:barkbarkbark"+ "</tr>"+ "</table>"+ "<br>"+ "<br>"+ "<br>"+ "<I><b><center>Notice:</b></I><I>Exposing the wolf code to any outsider will result in your termination from the pack and your country being destroyed.</center>";
document.getElementById("span").innerHTML = body2;
break; case "cmd2":
document.title = "The Wolves";
var body2 = "<br>"+ "<center>Shwb1(Leader)<br>"+ "Type: Direwolf<br>"+ "CodeName: DW<br>"+ "Comments: BarkBarkBark<br>"+ "Image:</center>"+ "<center><img src=\"http://images.wikia.com/lon/images/f/f8/Savage_Dire_Wolf.png\" /></center>"+ "<br>"+ "<br>"+ "<br>"+ "<br>"+ "<br>"+ "<br>"+ "<center>Flare_silverbend(Commander)<br>"+ "Type: Czecholovakian Wolfdog<br>"+ "CodeName: CSW<br>"+ "Comments: Epic Wolfdog<br>"+ "Image:</center>"+ "<center><img src=\"http://dl.dropbox.com/u/34703508/csw.jpg\" /></center>"+
"<br>"+ "<br>"+ "<br>"+ "<I><b><center>Notice:</b></I><I>Exposing the wolf code to any outsider will result in your termination from the pack and your country being destroyed.</center>"; document.getElementById("span").innerHTML = body2;
break;
case "cmd4":
document.title = "About the Wolves";
var body2 = "<br>"+ "<center>The wolves are an alliance of many different wolves<br>"+ "from all over we are a band of wolves who do not treat traitorism well<br>"+ "if you leave us and you arnt trusted, you die<br>"+ "<br>"+ "We use our own code(Wolf Code) and if that gets out its dangerous to us<br>"+ "so that is why we kill deserters if they arnt trusted<br>"+ "The Wolves are founded by Flare_Silverbend and is now owned by shwb1"+ "<br>"+ "<br>"+ "<br>"+ "<I><b><center>Notice:</b></I><I>Exposing the wolf code to any outsider will result in your termination from the pack and your country being destroyed.</center>"+ "<br>"; document.getElementById("span").innerHTML = body2;
break; } } </script> <select onChange="menuAction(this)"> <option value="cmd4">About the Wolves</option>
<option value="cmd2">The Wolves</option>
<option value="cmd1">The Message Board</option>
</select> </head> <body"> <span id="span"> <center>The wolves are an alliance of many different wolves<br> from all over we are a band of wands who do not treat traitorism well<br> if you leave us and you arnt trusted, you die<br> <br> We use our own code(Wolf Code) and if that gets out its dangerous to us<br> so that is why we kill deserters if they arnt trusted<br> The Wolves are founded by Flare_Silverbend and \"Co-owned\"(As he likes to think ;P) by shwb1 <br> <br> <br> <I><b><center>Notice:</b></I><I>Exposing the wolf code to any outsider will result in your termination from the pack and your country being destroyed.</center>
</span> </body>
|
Problem description:in my guide on wolves this is the script using HTML but when i use it whenever i switch from the wolves to the message board or something to something(whenever i move from one place to another) i get a error:
An error has occurred in the script on this page
line: 80
Char: 1
Error: Unknown runtime error
Code: 0
UR:: file:///C:/Users/Home/Documents/BYOND/cache/2571d67c.htm
Do you want to continue running scripts on this page?
can someone please help me?
|