0
<html>
<head>
<title>frame and button</title>
<script language="Javascript">
function sho(form)
{


document.writeln("click click boom!");
alert("clicked!);
form.tex1.value="abc";


}
</script>
</head>
<body>
<form name="cosine">
<input name="tex1" type="text"  value=" "><br><br>
<input name="button1"  type="button" value="click" onClick="sho(this.form)">
<input name="reset1" type="reset" value="clear">
</form>
</body>

</html>

Edited by happygeek: fixed formatting

3
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by plazmo
0

What are you trying to do and why isnt it working?

Sorry to lazy to download your code, save it to a HTML file, and guess what it is your trying to do and what isnt working how you want it.

0

you cant call a "document.write/writeln" after a page has been loaded or it clears the screen. i just learned this myself. you have to work with the ".innerHTML" of the dom object.
so you create an object such as a div can call it by id. then edit the innerHTML

i learned a lot about this at this site: http://www.w3schools.com/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.