SHORT DESCRIPTION:
For example we have two pages. The second page contain block which filled via AJAX. This is a big block and contain tabs(5 pieces) and each tab have handler(click event). On the first page we have a link which open the second page. I want to do the following: when user clicks on link on the first page then open second page and execute handler attached to a specific tab.
How can I do this?
MORE DETAILS:
I have page which contain schedules of event:
<div id="content">
<div class="section">
<div id="listInfoBlock" class="list_infoBlock">
</div>
<!-- .list_infoBlock-->
</div>
<!-- .section-->
</div>
The listInfoBlock filled via AJAX:
function loadEventList(id, tab) {
$('#listInfoBlock').load('/BaseEvent/EventList?period=' + id+"&tab="+tab, function () {
//the some actions
});
}
When listInfoBlock is filled it contain info about event and schedules:
<table class="time_table" cellspacing="0">
<tbody>
<tr>
<td>
<a href="/Place/PlaceOverview/4">PlaceName</a>
</td>
<td class="time_list">
<ul>
<li>
<a href="URL" session="19" hall="2" client="1">19:00</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
When a user click on a time(a tag) then loads a second page. This is the second page contain details info about event and block called Publication. This is a big block which contain tabs(5) load via AJAX. When user click on tab called “Schedule” then via AJAX loads schedule of event. The user selects time and the hall plan is shown to him. The user has to do a lot of unnecessary actions.
I want to do the following: when user clicks on time on the first page then load second page, make the Schedule tab as active and load hall plan.
How to do such things?
Thanks and sorry for my english.
You can look at the anchors. That is, on the first page append some anchor to the url (e.g.
$('#listInfoBlock').load('/BaseEvent/EventList?period=' + id+"&tab="+tab+"#ScheduleTab"), and on the second page in theonLoadevent check for anchor (location.hash) and make the required tab active if it is equals toScheduleTab.