HOW TO reload the page with a certain tab being selected?

Discuss everything related to ApPHP Tabs. Any questions related to the ApPHP Tabs developing or using should be posted to this forum.

Moderators: ne_moj, zewa, Milton, vadimako, ne_moj, zewa, Milton, vadimako

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

HOW TO reload the page with a certain tab being selected?

Postby Milton » Nov 27th, '11, 16:39

To reload the page with a certain tab being selected you need to use the tabidXXX parameter (XXX is Tabs object's id, 1 by default). First of all, turn on debug mode so that you would be able to see all tabs ids (see debug_info.jpg).

Code: Select all

$tabs = new Tabs();
....
$tabs->Debug(true);

Suppose you want to open the Tabs object with 'Rome' tab (id is 1_1_1_3_1) being selected. Then the link you should use is 'index.php?tabid1=1_1_1_3_1'
You can even navigate to it from inside the Tabs themselves.

Code: Select all

$tabs = new Tabs();
...
$code=$tabs->AddTab("Go to Rome","");
$code->SetInnerHTML("<form action='index.php'><input type='hidden' name='tabid1' value='1_1_1_3_1' />  <input type='submit' value='Go to Rome!' /></form>");
Attachments
debug_info.JPG
debug_info.JPG (21.25 KiB) Viewed 1189 times

Return to “ApPHP Tabs”