• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to copy the data one form field to another form field by using check box

 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i have jsp page using html tags within,
now on checking of the check box some of the fields present in the page should be copied to another fields.

i used simple javascript validation when the checkbox is checked, but my page when totaly loaded and runs in local tomcat server, my page page goes blank and its bery diffiult to find whats the problem.
i dentified that if i tried to "name" the field to be copied problem started.
here is my code snippet:



please guide me shoot this problem.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First things first, does the page ever show up? At what point does it "go blank"?

And remove the XML directive from the first line; what's that doing there?
 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Bear Bibeault ,

thanks for reply.

Bear Bibeault wrote:First things first, does the page ever show up? At what point does it "go blank"?

And remove the XML directive from the first line; what's that doing there?


well page doesnt show up. as suggested wii remove the xml tag.
all this started when i added name attribute in html:text
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, problems with a Struts tag should be discussed in the Struts forum. I have moved this post there for you.
 
jatan bhavsar
Ranch Hand
Posts: 299
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj,

Why you have not included any struts tag library?

Regards
Jatan
 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault ,

Bear Bibeault wrote:In that case, problems with a Struts tag should be discussed in the Struts forum. I have moved this post there for you.


my page do have the struts tag libs, but i didnot copy them earlier in code snippet.also my project involves struts,springs,hibernate.

here below i post my full code for jsp with out removing the xml directive .

 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jatan bhavsar wrote:Hi Raj,

Why you have not included any struts tag library?

Regards
Jatan


Hi jatan,

Thanks for reply,

all the needed taglibs were inluded, complete jsp code was posted above.

Actually i just added a script fun in existing jsp page in my project and few lines of code to add checkbox functionality to copy data in the same jsp to the newly added text fields i created.
I added name attribute to one of existing <html:text> tag (source ) and to newly added <html:text > tag (destination)
so, i believe problem might be around name attribute
 
raj chopra
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Problems got solved.

problem was related to using the name attribute.

Solution : here the html:text automatically generates the name of the input type, based on the generated name we can use proceed ahead rather than specifically using the name attribute.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic