post call to a php function
ok what im doing is using onmousedown to call my javascript function this function then sets a php variable to a form depending on what i send. how do i get what is returned from php script back to the the orginal script so it can be displayed in an a drop down using
function toggleInteractContainers(x)
{
if ($('#'+x).is(":hidden")) {
$('#'+x).slideDown(200);
} else {
$('#'+x).hide();
}
$('.interactContainers').hide();
}
the html is
<div class="interactContainers" id="edit_venue">
<?php echo $display_edit_form; ?>
</div>
the script is
if ($_POST["request"] == "edit_now")
{
$display_edit_form ='
<form action="" method="post" name="venue_edit">
<table width="90%" border="1" cellspacing="5" cellpadding="5">
<tr>
<td width="20px">&l开发者_JAVA技巧t;?php echo $id ?></td>
<td align="right">Venue Name :</td>
<td align="left"><input name="venue" type="text"></td>
</tr>
</table>
<input name="submit" type="submit" value="submit">
</form>';
return $display_edit_form;
}
i just need a javascript to call the post and get the $display_edit_form back then set it to a php Var
I hope i gave you enough info to give me an answer
if I understand correctly you need to make an ajax call and then append the HTMLresponse into your interactContainer div (not using php echo out)
精彩评论