Reputation: 423
I currently have a JSP page, containing a Jquery UI based accordion (based on left hand side of the page), that in turn when you select an option in this accordion, it launches a new tab (the tabs are based in the centre of the page)
The content that is loaded into my new tab, is from a JSP page that I have within my project. I am doing this with IFRAME, but I wonder if there is a way to load this JSP's data into the tab without it being an IFRAME?
This JSP contains a dynamic data, images and text.
It would be cleaner if it was output displayed within the tab itself and not an IFRAME - the usability for this isn't great.
What alternative options to IFRAME could I have for doing this?
Upvotes: 0
Views: 1465
Reputation: 16795
You can use jQuery's load function, it is very simple and easy to use.
A good example of this can be seen here: http://jsfiddle.net/SO_AMK/TR2kn/ (click expand)
A simpler example: http://jsfiddle.net/SO_AMK/TR2kn/1/
But, please be warned that this cannot load data across domains so the data must be on your server (there are some workarounds but they get complicated)!
Upvotes: 1