Ben index.php sayfası var ve orada bu var
$pv->showHidden = isset($_POST['showHidden']) ? intval($_POST['showHidden']) : 0;
$pv->sendHidden = isset($_POST['showHidden']) ? 0 : 1;
ve sonra ben bu var
<input type="image" id="btnShowHidden" src="images/hide.gif" onclick="showHiddenRecords(<?php print $pv->sendHidden; ?>);" />
Ben bu fonksiyona sahiptir javascript
function showHiddenRecords(x){
alert(x);
var n = new Object();
var showHidden;
if(x=1){Y=0;} else {Y=1;}
n.showHidden = Y;
Ajax.Post("index.php", n, pg.test(x));
}
What I am trying to do is to toggel the value of $pv->showHidden . So if it is 1 (already selected) then it will become 0 and vice versa. But logic isnt working.
Thanks in advance