Click here to Skip to main content
15,886,063 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: PHP Form help Pin
Peter_in_27801-May-11 4:59
professionalPeter_in_27801-May-11 4:59 
GeneralRe: PHP Form help Pin
Dave McCool1-May-11 5:08
Dave McCool1-May-11 5:08 
Questionthe apache service doesn't start Pin
Farhaneh25-Apr-11 20:10
Farhaneh25-Apr-11 20:10 
AnswerRe: the apache service doesn't start Pin
Gerben Jongerius25-Apr-11 20:41
Gerben Jongerius25-Apr-11 20:41 
QuestionAn XML printer thingy Pin
freeluna22-Apr-11 14:23
professionalfreeluna22-Apr-11 14:23 
QuestionClosing a window with button?? Pin
AmbiguousName21-Apr-11 6:00
AmbiguousName21-Apr-11 6:00 
AnswerRe: Closing a window with button?? Pin
Ali Al Omairi(Abu AlHassan)21-Apr-11 15:21
professionalAli Al Omairi(Abu AlHassan)21-Apr-11 15:21 
AnswerRe: Closing a window with button?? Pin
enhzflep3-May-11 6:53
enhzflep3-May-11 6:53 
You could use the code I posted in one of your above questions about submiting a form to a php file.

You would also probably want to use this function that I hacked together some time ago.

Basically, you can run the php script, then get a callback once it's done. In the call-back you'd just close the window of concern.

function myGetAjaxResponseWithCallback(target, url, callbackFunc)
{
  AjaxRequest.get(
	{
	  'url':url,
	  'onSuccess':function(req){ target.innerHTML=req.responseText; callbackFunc();}
	}
  );
}


I suppose a to use it you'd just
1) define a function named myCloseWindow, or whatever.
2) form the url based from the php script you wish to run, along with any arguments given to it
3) create an element on the page that will serve as a container for any response text returned (or just delete "target.innerHTML=req.responseText;" from the above function)
4) call myGetAjaxResponseWithCallback(target, url, myCloseWindow)


Alternately, you can avoid defining a function myCloseWindow (globally) and can do so thusly:

myGetAjaxResponseWithCallback(target, url, function(){** do whatever you want in here **});


I seem to remember using this method to process results of ajaxRequests as they came back in.

Best regards.
QuestionHow to open Perl files / Perl Module files in Design Layout Pin
sr15920-Apr-11 19:04
sr15920-Apr-11 19:04 
QuestionFuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz18-Apr-11 19:35
edrianhadinatazz18-Apr-11 19:35 
AnswerRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz18-Apr-11 19:38
edrianhadinatazz18-Apr-11 19:38 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
User 171649218-Apr-11 22:07
professionalUser 171649218-Apr-11 22:07 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
Smithers-Jones19-Apr-11 1:53
Smithers-Jones19-Apr-11 1:53 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz28-Apr-11 17:31
edrianhadinatazz28-Apr-11 17:31 
Questioncheckboxes from hell Pin
Joan M13-Apr-11 4:24
professionalJoan M13-Apr-11 4:24 
AnswerRe: checkboxes from hell Pin
Graham Breach13-Apr-11 5:32
Graham Breach13-Apr-11 5:32 
GeneralRe: checkboxes from hell Pin
Joan M13-Apr-11 5:48
professionalJoan M13-Apr-11 5:48 
AnswerRe: checkboxes from hell Pin
Luc Pattyn13-Apr-11 6:11
sitebuilderLuc Pattyn13-Apr-11 6:11 
GeneralRe: checkboxes from hell Pin
Joan M13-Apr-11 6:33
professionalJoan M13-Apr-11 6:33 
Questionphp and div tags Pin
komanche12-Apr-11 23:52
komanche12-Apr-11 23:52 
AnswerRe: php and div tags Pin
enhzflep13-Apr-11 3:45
enhzflep13-Apr-11 3:45 
AnswerRe: php and div tags Pin
Mutinda Boniface15-Apr-11 3:44
Mutinda Boniface15-Apr-11 3:44 
QuestionMore of a poll than a question... Pin
Albert Holguin8-Apr-11 5:04
professionalAlbert Holguin8-Apr-11 5:04 
AnswerRe: More of a poll than a question... Pin
Nemanja Trifunovic8-Apr-11 5:20
Nemanja Trifunovic8-Apr-11 5:20 
GeneralRe: More of a poll than a question... Pin
Albert Holguin8-Apr-11 5:27
professionalAlbert Holguin8-Apr-11 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.