I am writing a product that is using a tab menu for navigation. I am using some 
third party software that combines java script and cascading style sheets to 
create the tab menus with. Each tab can have one or more tabs. 

I am also using struts and strut tiles in the tool. 

I need to figure out a way of contolling which tab and subtab should be marked 
as the currently active ones. The java script that is used to create the tab 
strip menu has two variables that are used to determine the currently active 
tab and subtab. I can default the values so that when I go to the first page 
the selected tab and subtab match the current page I am on. 



I need to come up with a way to softcode those two java script variables within 
each jsp so that the jsp will determine which tab and subtab is currently 
active. 



My code has the following include. 

<script type="text/javascript" language="JavaScript1.2" 
  src="/webquotes10/jsp/users/admin/js/tab-menu-mac.js"


The tab-menu-mac.js script includes the two hard coded variables. 

var bselectedItem = 0; 
var bselectedSmItem = 1; 

I tried commenting the above two variables out of the tab-menu-mac.js file and 
including them as part of the script as follows so the the jsp could determine 
what the current tab and subtab is. 

<script type="text/javascript" language="JavaScript1.2" 
var bselectedItem = 0 
var bselectedSmItem = 1 
src="/webquotes10/jsp/users/admin/js/tab-menu-mac.js"> 


IntelliJ didn?t have any errors but when I tried to use it in a web page I got 
the message that bselectedItem was undefinded. It is like the two variables I 
defined outside of the tab-menu-mac.js file are isolated in their own unit that 
cannot be seen by the code in the tab-menu-mac.js file. 


Does anyone have any ideas how to do this. I received an email from the third 
party vendor and this is what they had to say. 

About selected tabs. 
You should use 

var bselectedItem = >= 0; 
var bselectedSmItem = >= -1; 

parameter to set default selected item and subitem. 
You can use any server-side script, for example, php, to assign these 
parameters each time when a new page is loading. 

I am assuming in my case I can use JSP to set the parameters but I just haven't 
figured it out yet. 

Thanks for any help.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875994#3875994

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875994


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to