Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it possible to combine dynamic Javascript menu systems with Struts?

0
10 Posted

Is it possible to combine dynamic Javascript menu systems with Struts?

0
10

Location: http://www.jguru.com/faq/view.jsp?EID=471947 Created: Aug 8, 2001 Author: Ted Husted (http://www.jguru.com/guru/viewbio.jsp?EID=462042) The challenge with doing this is that the JSP tags run on the server (as the page is being generated), while the JavaScript runs on the client side. To integrate the two, you need your tags (and other JSP code) to dynamically generate the JavaScript functions themselves — sort of having a program write a program — so that the JavaScript is customized to your particular need on this particular page. A very trivial example is the way that the tag deals with the “focus” attribute. If you specify it, a dynamically generated bit of JavaScript is created to set the input focus, which includes the name of the field you want initial focus assigned to. For a more comprehensive scenario, consider that for most menuing systems you will need to configure the list of available options into a JavaScript array or something. You could use the <

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.