Warning… slightly longer than usual question ahead!
Currently we have a design layout as below.
To improve our user experience we have set the content area to be an IFRAME in which various pages can be loaded.
This way our head, menu and footer sections are not reloaded on each page request giving a static feel to our site.
However we would like to move to layouts within Coldbox and remove the IFRAME, so the content area would become a DIV in which we would load our main content pages (which would now have all their HEAD information such as styles and global Javascript dependencies removed…Great!!)
Unfortunately this causes us a dilemma when we are submitting forms in the content DIV this will naturally submit a completely new request.
We want the user to “feel” as if their header,left and footer sections are static.
We have two different proposed solutions to solve this problem.
- Any page that submits within the content area uses AJAX to process the form data and then we load any resultant messages/output into the content area again using Javascript/AJAX.
- We somehow use the caching abilities of Coldbox to cache the Header, Menu and footer sections so that the reload times are almost non existant.
The second option is more desirable since moving towards AJAX would in theory complicate our codebase and increase development times.
However there is an additional problem… the left hand menu has a accordion nature and main menu sections can be expanded to reveal sub sections.
So if the user selects “main section 2” and the section 2 items are revealed … on sending a new request this “menu state” needs to persist.
Any thoughts suggestions on how we would achieve our desired functionality within Coldbox would be very much appreciated.
Thanks very much
Alex