Dynamic change of jsp page

View: New views
4 Messages — Rating Filter:   Alert me  

Dynamic change of jsp page

by avaATG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all, here I've one scenario..please help me out to solve this

I've one dropdown in that I've some values. Which ever i select the following page should change look and feel (one page n should get changed dynamically).


For eg:
          If i select ABC the navigation should display horizontally

          if i select XYZ then the navigation should be vertically
(Look and feel should happen only in one page)



IF u've any queries for understanding let me know...

I hope u'll help

Thanks
Anil

Re: Dynamic change of jsp page

by Gustavo Recio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's what I would do without further information:

I would put in your form handler a property to contain the navigation style. When you render the page, check that property (with a Switch droplet, for example), to see what kind of navigation you have to show.

In your form, do the dropdown with a dspel:select, and set the bean property to the new form handler property. In the "onchange" event in your select, call a function in javascript which submits your form using a hidden submit called "refresh" (which you should implement in your form handler), that simply refresh your page, so the new layout is displayed.

This is a quick and dirty way. You may use ajax to do all that stuff without refreshing the whole page, or even use plain javascript to avoid all the communication with the server.

hope this helps,
Gustavo.

Re: Dynamic change of jsp page

by avaATG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thank u...

Re: Dynamic change of jsp page

by avaATG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

can u be more clear.... or send me the code
LightInTheBox - Buy quality products at wholesale price