troubleshooting Question

How to close ajax requested page

Avatar of idusty
idusty asked on
AJAXJavaScriptPHP
1 Comment1 Solution252 ViewsLast Modified:
Hi Experts,

I have an ajax request in order to load a php file, which essentially displays a pop-up. I use the code below:
$('input[name="rsrvButton"]').click(function() {
  mygetrequest.open("GET", "includes/content/bs/b_popup-reserve.php?bookingData=" + $(this).attr('id'), true);
  mygetrequest.send(null);
  e.preventDefault();
});

Open in new window


It works great, but how could I close it in the same elegant way as I open it? Maybe something like the following?
mygetrequest.close()

Open in new window


Thanks in advance.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros