Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: A Simple Form

  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    2
    Thanked 0 Times in 0 Posts

    A Simple Form

    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,

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    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

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #4
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •