Fry_watson
Feb 13th 2007, 3:10 pm
Ive been making a online turn based game in my free time, and i was wondering how to make it show up that ive bought the weapon. after i click submit its suppose to say you have 1 weapons. But its not working and how can i tell it were i want it to display it at.
heres my code.
sorry if i explained that bad.
<html>
<body background="http://www.script-design.com/img/home0/2.jpg">
<script type="text/javascript">
function Buy()
{
var name=prompt("weapon?","1")
if (name!=null && name!="")
{
document.write("You have" + name + "Weapons")
}
}
</script>
<input type="text" name="prompt" value="1">
<input type="submit" name="prompt" value="Submit">
</body
</html>
heres my code.
sorry if i explained that bad.
<html>
<body background="http://www.script-design.com/img/home0/2.jpg">
<script type="text/javascript">
function Buy()
{
var name=prompt("weapon?","1")
if (name!=null && name!="")
{
document.write("You have" + name + "Weapons")
}
}
</script>
<input type="text" name="prompt" value="1">
<input type="submit" name="prompt" value="Submit">
</body
</html>