I try to pass jquery variable to other php page in php code. but i can't. so Please help me.
<div class="span4" style="padding-top: 4px;">
<h3><a name="works" id="w"> <?php echo $filename; ?></a></h3>
</div>
<input name="filename" type="hidden" id="filename"/>
function formtext() {
var aa = $('#w').text();
alert(aa);
$.ajax({
url : "exporttodoc.php",
type : "POST",
cache : false,
data : {
aa : aa
}
});
}
$_POST['aa']?undefined$.ajax will NOT send it over. Make sure you select it properly.