0

Dear All,
I am using third part tab. So I have build the tabs nicely and include the code like below. The problem now is that when one of the tab is press it call the javascript. So that is when I dont know how to pass the $dD or $dK value to be set true. If pure php I know how to do it but I dont know how to pass the value via the javascript. I have tried putting <?php ?> in the javascript but no sucess too. Any help please.

<?php
require "KoolTabs/kooltabs.php";


echo"dD".$dD;
echo "dK".$dK;
//Step 2: Create kooltabs object.
$kts2 = new KoolTabs("kts");

//Step 3: Set properties for kooltabs
$kts2->styleFolder = "KoolTabs/styles/silver";

//Step 4: Add tabs for KoolTabs: addTab($parentid,$id,$text,$link)
$kts2->addTab("root","dD","dD","javascript:showTab(\"dD\")",$dD);
$kts2->addTab("root","dK","dK","javascript:showTab(\"dK\")",$dK);
?>

5
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by happytogether
0

It's kinda hard to tell how the tab script works, is it a PHP script that generates the HTML and Javascript or is it just a javascript script that you need to pass the value to?

0

only who wrote that class you are using has the how to. If you don't want to read this class (and what is doing) write your own to avoid mixed logic.

0

have you try document.getElementbyId()?
you can pass javascript to php by passing value to another element
e.g

var content = 'abc';
document.getElementById('a').value = content ;

<input type="text" name="a" id="a">

<?php echo $_POST['a']; ?>
0

This looks a little awkward. jQuery UI tabs seem a lot easier to use.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.