• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 721
  • Last Modified:

Ajax Tabs

I am working on getting these tabs working for my project.  I have the tabs but they are not working correctly.  I believe it is because they are being generated from a php array.  How can I define a variable to act as the current page in the script I am using?
<ul class="shadetabs">
<?php
	if (isset($_POST["list2"]) && is_array($_POST["list2"]) && count($_POST["list2"]) > 0)
	  {
	    foreach ($_POST["list2"] as $item)
	      {
	      	$link = str_replace(' ', '_', $item); ?>
	        <li><a href="#div_<?php print $link ?>"><?php print $item ?></a></li>
	<?php } } ?>
</ul>

Open in new window

0
taynet29
Asked:
taynet29
1 Solution
 
ZylochCommented:
Are your tabs controlled completely via Javascript without any page reloads? If so, you need to use Javascript to help style the active tab differently, and we will need to see more of your code.
0
 
wildzeroCommented:
>>How can I define a variable to act as the current page in the script I am using?

$_SERVER["REQUEST_URI"]
or
$_SERVER["SCRIPT_NAME"]
or
$_SERVER["PHP_SELF"]

Arguments
$_SERVER["argv"]

a few there to take your pick from depending. Some contain arguments and some dont.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now