• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP variables in JavaScript ?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I'm not a big fan of JavaScript. But we need JavaScript in our project. So could anybody tell me how to read the variables of JSP in to JavaScript. If possible plz show with example.

One another thing if i used HashTable or any other Data Structure of java, could we read it using JavaScript.

The thing is that According to the selection of option from one Dro-down i have to load second one. Just like Country & States. After selecting country it should load States of the same country

Suggest if any tutorial on the same

Thanks in Advance
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since JavaScript can only see the things on the client side, you have to make your server side code display it. What I mean is you need to phsically write out the information on to the page.

Normal ways of doing is is building a JavaScript array by looping through the information on the server.

Eric
 
His brain is the size of a cherry pit! About the size of this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic