• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic