| Author |
Form within form
|
pendse anagha
Ranch Hand
Joined: Mar 09, 2005
Posts: 44
|
|
Hello Ranchers , I have a form within a form ( please dont ask me why - but essentially there is a huge jungle of HTML code and Java script that I need to maintain ) so thats the way it is . Thanks for bearing with me . Here is what I need to do : There is a text area in the second form I need to highlight some text in the text area of the second form Then when I click a button ( in the first form ) I need to append some text prior to the highlighted text . This works fine if the text area and the buttons are in the same form but not when the text area is in the other form . Here is the code that I have : Can someone please help me out ? Thanks in advance , -anagha
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26168
|
|
Anagha, In this example, you have two forms one after another. Not a form within a form (luckily.) You can use an absolute path type structure to access the textarea. For example, document.form2.txtArea2.value += "new stuff";
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
pendse anagha
Ranch Hand
Joined: Mar 09, 2005
Posts: 44
|
|
Hello Jeanne , My mistake - I typed it incorrectly I do have a form within a form . Here is the corrected code :
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
By the rules on HTML, you can not have a form inside of a form and have it function correctly..... What is the purpose of the two forms? Eric
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Form within form
|
|
|