Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

document.formname.textarea.value output

Posted on 2003-12-08
3
Medium Priority
?
505 Views
Last Modified: 2012-05-04
I need to udate a hidden field in another form from a textarea on the same page, when i click refresh the data that comes back is always undefined.
this is basicly what I have sofar...
<script>
<!--
function getplans(id)
{
document.hiddenform.comments.value =      document.insert_asset.comments.value;
}
//-->
</script>

<form name="insert_asset">
<textarea name="comments" cols="20" rows="3" wrap="virtual"><%=Request("comments")%></textarea>
<input type="button" onclick getplans("123")>
</form>
<form name="hiddenform">
<input type="hidden" name="comments">
</form>

how do I get the comments input in hiddenform the same as the comments textarea  in insert_asset? ( I will then be using the hiddenform to post the info to another page.
0
Comment
Question by:Pyro-San
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Zontar earned 150 total points
ID: 9902674
<script type="text/javascript">
<!--
function getplans(){ document.hiddenform.comments.value = document.insert_asset.comments.value; }
//-->
</script>

<form name="insert_asset">
<textarea name="comments" cols="20" rows="3" wrap="virtual"><%=Request("comments")%></textarea>
<input type="button" onclick="getplans();">
</form>
<form name="hiddenform">
<input type="hidden" name="comments">
</form>
0
 

Author Comment

by:Pyro-San
ID: 9908378
:) sorry silly me cant see past my nose, I figured the problem out and it is not with the code I pasted, it is with a portion of the code I left out on my page. that code that I posted works, thanks anyhow Zontar
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9909186
Fair 'nuff. Ta for the points.

If I had ten cents for every dumb typo or copy/paste error I've made that caused me fits, I'd be nearly as rich as Bill Gates. ;)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question