This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 61315
    
  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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java String Array variable in JSP to a javascript function?