codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  changing a forms value  johnboy007_2006 at 13:38 on Monday, June 21, 2010
 

how can i edit the following html/javascript so that when a user submits the form the element with id #container is updated with the value from #name

<form action="" method="post" name="form_name" id="form_name" onsubmit="return update_name(this)">
<fieldset>
<label for="your_name">Enter Your Name</label>
<input type="text" name="your_name" id="your_name" />
<input type="submit" />
</fieldset>
</form>


  Re: changing a forms value  kalish88 at 11:41 on Tuesday, August 31, 2010
 

Try using name="statusform" not id. Remember with IDs you actually have to get the ID by using getElementByID. When you use document.statusform, you are referencing it by name. I think that will solve your problem.

Oh and a side note, I would make your submit button into just a button that calls a javascript function which can set the value and then submit the form.
========================
[URl=http://www.aussie.com.au/insurance/life-insurance.htm]Insurance Life[/url] | [URl=http://www.aussie.com.au/insurance/life-insurance.htm]Life Insurance Company[/url]








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: need help creating mysql database for my java code
•  Water volume
•  Solr- New face of Search
•  Re: Insert Contents of .txt file into a .html page
•  Re: changing a forms value
•  Re: insert datepicker on each row
•  Re: Drop Down menu made viewable based on cookie
•  Re: Need Javascript Multiple sidebar menu with sliding effects
•  Re: IsDate() in JavaScript?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010