• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Set JavaScript Value from Element Value

 
Ranch Hand
Posts: 1938
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a jsp file that I call from two different containers in my web application.

The file has this in the code to get a session value:



A call from container 1 will set this value to 0 while a call from container 2 will set it to 1.

Also in the jsp I have jQuery where I get this value:



My issue:

Container 2 makes the call and all is well.
Container 1 makes the call and all is well.
Now if I make a call from container 2 again the source value return 0 when I expected  a value of 1.
In this scenario if I inspect the HTML the value of the input is 1 yet the source value displays 0.
 
Steve Dyke
Ranch Hand
Posts: 1938
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I have solved this. If I call the .Empty() method on container 1 when it gets closed the problem goes away.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!