HighDots Forums  

Re: Concatenating dynamically created text box values

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Concatenating dynamically created text box values in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kaeli
 
Posts: n/a

Default Re: Concatenating dynamically created text box values - 10-17-2003 , 08:30 AM






In article <25d4a987.0310161218.42aa98fb (AT) posting (DOT) google.com>,
webjunk4me (AT) hotmail (DOT) com enlightened us with...
Quote:
Hi There,

The following is a popup form that works exactly as I want but I now
need to get the values of each text box added when a user clicks the
'Add' button and pass the values back the opener form into a textarea.

Thanks in advance!

Substitute your form names in the code. Assumes you want the values of
ALL text elements in the form.

var s="";
var l = document.formName.elements.length; //popup form name here
for (var i=0; i<l; i++)
{
e = document.formName.elements[i]; //popup form name here
if (e.type=="text") s+= e.value+" "; // space between values so
one can read them
}
opener.document.formName.elementName.value = s; //opener form name and
the textarea name here

-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.