944,218 Members | Top Members by Rank

Ad:
Jan 20th, 2006
0

my html code isnt working please help

Expand Post »
<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>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abhinaynagpal is offline Offline
7 posts
since Jan 2006
Jan 20th, 2006
0

Re: my html code isnt working please help

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.
Reputation Points: 25
Solved Threads: 7
Junior Poster
Drew is offline Offline
166 posts
since Apr 2004
Jan 20th, 2006
0

Re: my html code isnt working please help

ia m trying to get the text displayed on clicking the button
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abhinaynagpal is offline Offline
7 posts
since Jan 2006
Jan 20th, 2006
0

Re: my html code isnt working please help

So your trying to change the value of the submit button to "click click boom!"?
Reputation Points: 25
Solved Threads: 7
Junior Poster
Drew is offline Offline
166 posts
since Apr 2004
Jan 21st, 2006
0

Re: my html code isnt working please help

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/
Reputation Points: 23
Solved Threads: 16
Posting Whiz in Training
plazmo is offline Offline
206 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: write issues
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Form





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC