File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Javascript to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Javascript to JSP" Watch "Javascript to JSP" New topic
Author

Javascript to JSP

Timothy Willard
Greenhorn

Joined: Apr 03, 2001
Posts: 25
I am working on a project that supports multiple browser types. To identify a user's browser, I am using a Javascript function. Can someone please show me the syntax for setting a Javascript variable to a JSP variable.
<% String jspBrowserName = ""; %>
<SCRIPT LANGUAGE="JavaScript">
function identifyBrowser()
{
var jsBrowserName = navigator.appName;
<% jspBrowserName = jsBrowserName;%>
}
</SCRIPT>
akshay mahajan
Greenhorn

Joined: Jan 18, 2001
Posts: 10
U can do one thing...
Write JS get the browser store in a hidden filed in HTML, submit the form. accept the value in the next form...
Need more help let me know
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript to JSP
 
Similar Threads
Problem with script tag
passing jsp variable to java script function on same page
Transfer Interupted..
Problem with closing script tag
How to call javascript functions from JSP