aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Java String Array variable in JSP to a javascript function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Java String Array variable in JSP to a javascript function?" Watch "Java String Array variable in JSP to a javascript function?" New topic
Author

Java String Array variable in JSP to a javascript function?

Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48
I have a javascript functioned defined which accepts a String array as the input. I am not able to do this.

Thanks,
Amba
[ November 21, 2006: Message edited by: Bear Bibeault ]

Ambika Jain
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61222
    
  66

You can't. The Java construct exists on the server. The JavaScript executes on the client.

Please read this article for a better understanding of JSP.

What you can do is to use the JSP to write javaScript syntax into the page that re-creates the string array in JavaScript.
[ November 21, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java String Array variable in JSP to a javascript function?