actually, waht im trying to say, is how do you get a browser window to open a webpage submitted by a command prompt. like, the user types in where he wants to go, and clicks ok, then he's off! im trying to get the url to open in the current browser.
for some reason or another, the URL entered wont work. it always goes to a page that says, the page you have requested cannot be found.
<script language="javascript" type="text/javascript">
<!--
window.alert("what do you want to do today, surf the web, or do you want to play a game?"
var command=window.prompt("type surf_web, or game_plz in the field below."
if (command == "surf_web" {
var url=window.prompt("what website do you want to go to?","type URL here"
window.alert("bye!"
window.location = url;
}
else if (command == "game_plz" {
window.alert("ok, we can play a game!"
window.alert("its not a very fun game, but its the thought that counts right? right??"
var friend=window.prompt("give me one of your friend's names plz.","type name here"
var enemy=window.prompt("now give me a name of one of your enemies(if you have any).","type name here"
var gender=window.prompt("Is your enemy a male or a female?","type male or female plz."
if (gender == "male" {
var gender="him";
}
else if (gender == "female" {
var gender="her";
}
var string="" + friend + " and a monkey ran over to " + enemy + ", and laughed at " + gender;
window.alert(string);
window.alert("that was fun wasn't it! wasn't it?"
window.alert("Ok, Since your board of me already, I guess we can just talk later, dat ok? good! ^_^"
}
//-->
</script>
next to each "htt.." string is a semicolon - the emsage board inserted them, so take them out if you want your script to work jared@aauser.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.