my html code isnt working please help

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jan 2006
Posts: 7
Reputation: abhinaynagpal is an unknown quantity at this point 
Solved Threads: 0
abhinaynagpal abhinaynagpal is offline Offline
Newbie Poster

my html code isnt working please help

 
0
  #1
Jan 20th, 2006
<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>
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 167
Reputation: Drew is an unknown quantity at this point 
Solved Threads: 7
Drew's Avatar
Drew Drew is offline Offline
Junior Poster

Re: my html code isnt working please help

 
0
  #2
Jan 20th, 2006
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.
Drew Gauderman
ASP / MSSQL Coder
http://www.iportalx.net - My ASP Portal
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 7
Reputation: abhinaynagpal is an unknown quantity at this point 
Solved Threads: 0
abhinaynagpal abhinaynagpal is offline Offline
Newbie Poster

Re: my html code isnt working please help

 
0
  #3
Jan 20th, 2006
ia m trying to get the text displayed on clicking the button
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 167
Reputation: Drew is an unknown quantity at this point 
Solved Threads: 7
Drew's Avatar
Drew Drew is offline Offline
Junior Poster

Re: my html code isnt working please help

 
0
  #4
Jan 20th, 2006
So your trying to change the value of the submit button to "click click boom!"?
Drew Gauderman
ASP / MSSQL Coder
http://www.iportalx.net - My ASP Portal
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 206
Reputation: plazmo is an unknown quantity at this point 
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Re: my html code isnt working please help

 
0
  #5
Jan 21st, 2006
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/
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC