...

View Full Version : A Simple Form



.Darkman
05-18-2007, 10:00 AM
Hello Everybody,

I need some help in making a simple form.

What i want is, once i fill in the information and hit submit, an "external" url will be contacted using GET method. It sends the form data to the url and displayed the response in place of the form.

How do i do it ?

I came up with something basic. But when i put the form on one server and the processing PHP script on another, it fails.



Thanks,

ess
05-18-2007, 12:20 PM
It fails due to security issues. Basically, you cannot use ajax to make calls to a remote server...other than the server you script resides in.

If you are looking for a work around, then you might have to submit your script to your server...and then have PHP forwarding the request to the second server.

Cheers,
Ess

.Darkman
05-18-2007, 04:11 PM
Oh ! Okay :(

So how can i do it simply ? on the same server of course.

Instead of form, just using a link.

When a link is clicked, a GET url will be contacted and the result will be displayed in place of the link.

ess
05-19-2007, 11:45 AM
Check out the following link...it is a very good tutorial on Ajax...and should demonstrate how you can do just that

http://developer.mozilla.org/en/docs/AJAX

Cheers,
Ess



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum