layout - Page Navigation in php...showing same content as was before reload -


i have web page following layout:

navigation pane         --------------content pane--------------- item1                   -                                       - item2                   -                                       - item3                   -                                       - item4                   -                                       - item5                   ----------------------------------------- 

so when click on item1 content pane shows content related item 1 , on. using $.post() retrieve data.

the problem when reload page particular item selected, shown content related default selected item page(say item1). how should implement when reload page shown content corresponding selected item.

this same facebook's nav pane navigating through groups , news feed.

please me out here..

you try this:

add hash tag links:

<a href="#item1">item1<a> <a href="#item2">item2<a> ...etc 

when page reloads, check hash tag , load relevant content:

loadmycontent(window.location.hash) //where loadmycontent own function 

since refused post code (you should post code), i'm trying demonstrate general idea. need edited compatible project. might want sanitisation on window.location.hash avoid js errors non-existent items.


Comments