gildash2
02-25-2004, 12:00 AM
<SCRIPT language="JavaScript">
function dic()
{
var bobj = document.bob.bob1.value;
var bobx = document.bob.bob2.value;
if(bobj == "J")
{
bobx="bkfdhkhjlgfhksglfkhjsdfkhjsdfkjslkhjslj";
}
else
{
alert('word doesnot compute');
}
}
</script>
<form name="bob">
<input type="button" value="click" onClick="dic()">
<input type="text" name="bob1" height="5" size="15"><br><input name="bob2" type="textarea" height="50" widht="6"></form>
could some1 please tell me whats wrong with this script?
what im trying to do is if the text box value is equal to a certain thing, then i want the text area to equal another, if it doesnt equal that certain thing, then i want an alert box to appear, its not working, please experts, edit my code, all help and any will be appreciated
function dic()
{
var bobj = document.bob.bob1.value;
var bobx = document.bob.bob2.value;
if(bobj == "J")
{
bobx="bkfdhkhjlgfhksglfkhjsdfkhjsdfkjslkhjslj";
}
else
{
alert('word doesnot compute');
}
}
</script>
<form name="bob">
<input type="button" value="click" onClick="dic()">
<input type="text" name="bob1" height="5" size="15"><br><input name="bob2" type="textarea" height="50" widht="6"></form>
could some1 please tell me whats wrong with this script?
what im trying to do is if the text box value is equal to a certain thing, then i want the text area to equal another, if it doesnt equal that certain thing, then i want an alert box to appear, its not working, please experts, edit my code, all help and any will be appreciated