Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript to JSP

 
Timothy Willard
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic