radar Posted May 17, 2007 Share Posted May 17, 2007 Okay so I have this function in javascript which has some ajax in it.. function saveChanges(obj){ var new_content = escape($F(obj.id+'_edit')); obj.innerHTML = "Saving..."; cleanUp(obj, true); var success = function(t){editComplete(t, obj);} var failure = function(t){editFailed(t, obj);} var url = 'index.php?action=about&act=save'; var pars = 'id='+obj.id+'&content='+new_content; var myAjax = new Ajax.Request(url, {method:'post', postBody:pars, onSuccess:success, onFailure:failure}); } the var url is the issue i am having an issue with... if i have it as edit.php (i created the file) it works perfect, though when i have it as in the code above, it stays on "saving..." doesn't do any updating... i would rather keep all of my logic in a single file instead of having to have an edit.php to complete the saving portion of this -- any clue how to do this? Link to comment https://forums.phpfreaks.com/topic/51776-spot-of-ajax-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.