J
Johnny J.
On my Master Page, I've got a menu on the left hand side which is basically
an unordered list of links. some of the the menu links have got submenus
which are nested unordered lists embedded in a <div> that I can show or hide
using javascript depending on whether or not the submenu is expanded or not.
If a submenu is open, I want to keep it open until the user decides to close
it.
What I've done until now is:
I've placed a hidden text field on the master page in which I record the div
id of the currently open submenu, and when the master page is submitted I
reopen the submenu with the id in the hidden field.
This works perfectly when submitting the master page itself, but if I click
another menu link to open another page that uses the same master page, then
the contents of the hidden field is not preserved (obviously enough because
the master page form is not submitted).
How can I transfer the id of the open submenu to the same master page
embedding another page - so that I can reopen the sub menu there as well?
I'm sure there's a best practise for such basic behaviour as this, but I'm
new to web programming (have programmed winforms for 20 years though).
TIA,
Johnny J.
an unordered list of links. some of the the menu links have got submenus
which are nested unordered lists embedded in a <div> that I can show or hide
using javascript depending on whether or not the submenu is expanded or not.
If a submenu is open, I want to keep it open until the user decides to close
it.
What I've done until now is:
I've placed a hidden text field on the master page in which I record the div
id of the currently open submenu, and when the master page is submitted I
reopen the submenu with the id in the hidden field.
This works perfectly when submitting the master page itself, but if I click
another menu link to open another page that uses the same master page, then
the contents of the hidden field is not preserved (obviously enough because
the master page form is not submitted).
How can I transfer the id of the open submenu to the same master page
embedding another page - so that I can reopen the sub menu there as well?
I'm sure there's a best practise for such basic behaviour as this, but I'm
new to web programming (have programmed winforms for 20 years though).
TIA,
Johnny J.