vkidv
09-05-2002, 06:17 PM
im quite new to actually 'writin scripts' and is wondering what is wrong with mine -
my bet is a wrong } or {
here is the script:
<html>
<script>
alert("hi, im rob!")
talk=confirm("do you want to talk to me?")
if (talk==false) {
alert("ok, bye")
}
if (talk == true) {
name=prompt("whats your name?","type ur name in here");
if (name==null || (name=="") {
name="web-surfer";
}}
alert("hello "+name+"!")
hobone=confirm("do you like javascripts? "+name+"?")
if (hobone==false) {
alert("you shouod, they are really cool "+name+"..")
} }
if (hobone==true) {
alert("me to "+name+" its really cool!")
gosite=confirm("hey if you like javascripts, want to go to a very cool website?")
if (gosite==true) {
window.open("http://www.dynamicdrive.com/")
}
if (gosite==false) {
alert("nevermind "+name+"!")
}}
</script>
</html>
my bet is a wrong } or {
here is the script:
<html>
<script>
alert("hi, im rob!")
talk=confirm("do you want to talk to me?")
if (talk==false) {
alert("ok, bye")
}
if (talk == true) {
name=prompt("whats your name?","type ur name in here");
if (name==null || (name=="") {
name="web-surfer";
}}
alert("hello "+name+"!")
hobone=confirm("do you like javascripts? "+name+"?")
if (hobone==false) {
alert("you shouod, they are really cool "+name+"..")
} }
if (hobone==true) {
alert("me to "+name+" its really cool!")
gosite=confirm("hey if you like javascripts, want to go to a very cool website?")
if (gosite==true) {
window.open("http://www.dynamicdrive.com/")
}
if (gosite==false) {
alert("nevermind "+name+"!")
}}
</script>
</html>