Okay. I know that this has to do with Prototype, which not everyone uses, but any help would be greatly appreciated.
I am currently using an ajax.request to call a php file so that I can update an object that is stored as a Session variable. To do this call I am using this code.
var query_string = "scripts/update_widget_action.php?service_id=" + qsParm['service_id'] + "&" + value;
new Ajax.Request(query_string, { asynchronous:true, method:'post', onSuccess:loadit() });
This works great. However once I get to the update_widget_action.php and I try to do a print_r($_SESSION), it prints an empty array. To solve this I tried to put in a session_start(); which then throws an error stating that the headers have already been sent. Has anyone ran into this before?
help with ajax.Request
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I have not been able to find a forum for prototype... they only seem to have an IRC channe, which is great unless your work is blocking IRC.
Thank you for your fast response. I am a bit new to this, so I am unsure of exactly where I would be sending a response to the browser. Since it is AJAX it doesn't seem like that is so "cut-n-dry" once I make that call to the update_widget_action.php, the first (and only) thing that I do is a session_start().
Thank you for your fast response. I am a bit new to this, so I am unsure of exactly where I would be sending a response to the browser. Since it is AJAX it doesn't seem like that is so "cut-n-dry" once I make that call to the update_widget_action.php, the first (and only) thing that I do is a session_start().