• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to copy a value to the same page?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a scenario, the page displays a table of values comes from database(ID, First Name, Last Name, Telephone), here ID column displays with links and if we click on the link the corresponding ID value should goes to a textbox on the same page. I know the javascript can do this but I've no idea how to make, could someone help me on this?
 
Sheriff
Posts: 67752
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
Establish a click handler for the link, within which you can fetch the id value and stuff it into the appropriate target.

How is the id value associated with the link?
 
Greenhorn
Posts: 13
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


or if you want an input and not a textarea:



 
sumanth kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Blaidd and Bear for replying.. Blaidd given solution would perfectly gave me the solution.

I got another question on the same thing that if the page displays 100s of rows and when we click on the link the id goes to textarea but the location is not moving to the textarea in the same page where we clicked, I need to move location to textarea. In order to do this the same there must be a javascript clue, can you please give me the solution.

Thanks, I really appreciate..
 
Blaidd Gwael
Greenhorn
Posts: 13
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


should work...
 
sumanth kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent ..Blaidd Gwael.. works. Thanks
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic