Jump to content

what to do with a 303?


sticksstones

Recommended Posts

A business I do freelance work for has formed an alliance with another larger company. I've been asked to scrape details and ultimately a form, from our alliance parters website where they use (I assume) a cms system to display both their and our up and coming events on their website.

 

I've been able to scrape their form onto our website and the information sends to their form-handling script perfectly (they've emailed me back to confirm my test messages), but (as I understand it) their script returns a redirect which throws a 303 error on our site. My problem is that i want the user to remain on our site and not be redirected onto one of their pages.

 

I've used simplehtmldom to scrape and a jquery $.ajax post to send the data, but I'm getting out of my depth as a programmer. I'd really appreciate some help!

 

Thanks

 

		           var form = $('.bookingform');
			   var data = form.serialize();
			   $('#result').html("Sending information");
			   $.ajax({
				   url:"http://www.allianceparter.com/handleform.aspx?form=2",
				   type:'POST',
				   data:data,
				   dataType:'json',
				   success:function(outputData)
				   {
					 $('#result').html("Your message has been sent");
				   },
				   error:function(xhr, status, errorThrown)
				   {
					 $('#result').html("Error: Failed to send ");
				   }
				  });

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.