Can anyone give me the solution of below problem.....
i have created following html web-page..
the problem is that when i click transfer button it copy data from box 1 to box 2.Thats fine....
but when i click clear button it does not empty the value of box 1.
Why, if there is an error in my coding please write the solution soon, please write the easiest methods to do it, i have my first try on javascript.
<html>
<head>
<script>
document.writeln(hifi())
function hifi()
{
var time = new Date
var avinash = "The current Time is " + time.getHours() + ":" + time.getMinutes()
return(avinash)
}
</script>
<script>
function fool()
{
var access
access = document.form1.Text.value ;
document.form1.Text2.value = access ;
}
function clearthis()
{
clear(document.form1.Text.value);
}
</script>
</head>
<body>
<h2 align="center">
!!!!Content Mover!!!!
</h2>
<h3>Instructions to use the application:-</h3>
<p>Firstly you have to enter data in Box1 then, Click the Transfer button to transfer data from Box1 to Box2.</p>
<p>Use Clear button to clear text from box 1</p>
<BUTTON onclick="fool()">Transfer</BUTTON>
<BUTTON onclick="clearthis()">Clear</BUTTON>
<form name="form1">
Box1:<input maxlength="100" type="text" name="Text" value="" >
Box2:<input maxlength="100" type="text" name="Text2" value="" >
</form>
</body>
</html>
please run this script in your own browser and give solution immediately