This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to copy a value to the same page?

 
sumanth kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
Blaidd Gwael
Greenhorn
Posts: 13
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


should work...
 
sumanth kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent ..Blaidd Gwael.. works. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic