passing a javascript array to java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mariaz
    New Member
    • Mar 2008
    • 11

    passing a javascript array to java

    Hello, I have an array in my javascript file:
    var locations=new Array();

    and I want to pass the attributes of the array into my java file, does anyone know how can this be done?
    Thank you in advance!
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    Please do not cross post the same question in multiple forums.

    Originally posted by mariaz
    I want to pass the attributes of the array into my java file, does anyone know how can this be done?
    What is your Java file? Where is it running? Java and JavaScript are completely un-related they can not pass values directly to each other. If your file is a servlet then you would need to send the elements in the array as parameters in a GET or POST request.

    Comment

    Working...