This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

compare columns

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using JSP I am displaying one table with 10 columns. I need to compare value in one column(say A,Static in nature) with value in another column (say B,which end user is going to enter through textfield)& want to show a message through alert if B<A. How i could achieve the same?

Shriniwas
[ October 06, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shrinivas,
This can be done by javascript. Keep all the static values in a javascript array. If you are going to compare with 2 columns in a same row, once the user inputs a value write a onBlur action for that field. In the onBlur function do the necessary comaprison of the user's input with that of the javascript array and show a java script alert after validation.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks first of all
I have not used javascript much can you suggest any site/refernce to do the same?
Shriniwas
 
Marshal
Posts: 67515
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shrinivas Mujumdar,

"Help!!!" is a poor chocie for a topic subject. I've adjusted this one for you. Please read this for more information.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what you can do is give your table an ID.



Now in javascript you access the table by the following mechanism.



This will return the table object.
Now using this table object you can move around in the table as follows



I hope the above will give you a start in the coding area. you can use the
w3schools website for further information and as usual google is always there to help.
Please come back in case you need clarification.
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic