Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

passing javascript variable in java method

Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got javascript variable and i want to pass tht variable to java method
do somebody have any idea how do i go about it ?
following is the javascript function
<script language="javascript">
function isFieldEnabled(jsfieldName,tagId)
//assignment to java variable from javascript
String fieldName = jsfieldName;
boolean fieldStatus = user.getUserProfile().isProfileFieldEnalbled(fieldName);
document[getNetuiTagName("parentForm")][getNetuiTagName(tagId)].disabled = true ;
I want to pass a jsfieldName(javascript variable) in isProfileFieldEnalbled of user class how do i do that ?
waiting for positive response
Rishi Yagnik
Posts: 15385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To pass the variable you need to submit a form to pass it to the server since you are talking about client/server interaction.

Posts: 67463
Mac Mac OS X IntelliJ IDE jQuery Java
The knights of nee want a shrubbery. And a tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic