• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get the value which changed by javascript in pagecode?  RSS feed

 
lijun wang
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
changePrice( getpriceTotals());
I have this method in the changprice.java(pagecode),getpriceTotals() get the totlas price bean which is a managed bean from session scpoe, this bean also bind to text40 (a HtmlOutputText)in changeprice.jsp.
my question is , when I change the value of text40, how can I get the right value through getpriceTotals(), because I always get the old value.
Thanks
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easy solution for you is to create a hidden field
and have both the text output value and the javascript value refer to this hidden field. the managed bean will also refer to this hidden field.

For example;
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!