Board Logo

Passing dynamic value
lysoftcomplex - 7/22/2008 at 03:36 AM

Hi,

I am testing the Tigra Menu and would like to pass a dynamic value from the menu to a another page.

I did look at the search for "pass value" and I still don't undertand how to pass value.

Here is the example of the menu_items.js that I created using _builder

var MENU_ITEMS = [
['Edit Profile', '/LIS/EditProfile.jsp', {'tw':'userHomeFrame','sb':'Edit Profile'}]
];

The target frame is "userHomeFrame", the link is "/LIS/EditProfile.jsp"

Now, how do I pass a dynamic value say "username", the username is pass from another page thru login. So, when the client click the "Edit Profile" menu, the "/LIS/home.jsp" will display at the target frame, but how does the username get pass?

Normally I do this to the link "/LIS/home.jsp?username=<%=username%>

Will that type of link work in the menu_items.js file?

Any feedback will be helpful.

Thanks


tigra - 9/22/2008 at 09:21 PM

instead of linking to the external static file (menu_items.js) you can copy its content in the <script> block inside your dynamically generated page and use the same approach:

var MENU_ITEMS = [
['Edit Profile', '/LIS/EditProfile.jsp?username=<%=username%>', {'tw':'userHomeFrame','sb':'Edit Profile'}]
];

for your JSP script there is no difference if it's HTML or JS it outputs


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/