View Single Post
Old 03-31-2007, 05:14 AM   PM User | #3
teracomp
New to the CF scene

 
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
teracomp is an unknown quantity at this point
That's encouraging. I don't think we'll have a problem with data xfer since it's all text/html, but will watch that.

I'm glad POST will work, but I don't know how to retrieve the $_POST var on the php script that the JavaScript request is calling.

I'm using the prototype library, so here's my call:

var url = 'saveActionItem.php?divID='+id+'&key='+myKey+'&itm='+myItm;
var myAjax = new Ajax.Request(
url, { method: 'post',
onComplete: update_page
});

The $_GET params are designed to control my sql query.

On the php side, I grab the text using:
$actTxt = $_POST['validFormVar'];

However, the $_POST var is not set, so $actTxt="" and my update essentially deletes the text.

Can you point me in the right direction?
teracomp is offline   Reply With Quote