ajax http request problem

Discussion in 'Programming' started by nerdGraphic, Jan 10, 2015.

  1. #1
    I'm learning this tutorial from YouTube:


    [​IMG]

    And I'm having this error on my wampserver

    [​IMG]

    And here is from my web host site[error]:

    http://raineerdelarita.comuv.com/jquery/



    [​IMG]
     
    nerdGraphic, Jan 10, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    The errors doesn't really help, since we can't see your code. And please don't post pictures. Post CODE.
    The first error, btw, is because you use an absolute path for the files, instead of a http : //localhost-path.
    The second, I dunno, since I can't see the code. But when visiting your site, it shows an XML-error on the page with the form.
     
    PoPSiCLe, Jan 10, 2015 IP
  3. CodeShop

    CodeShop Active Member

    Messages:
    137
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    These two things are really simple enough. The first error is because, you have used absolute filepath. "C:/wamp...../foodstore/..". You need to change it to URL instead of absolute filepath. For example, if you are working on local, you will use "://localhost/directory.../.../filename.php". As your page contains a domain which is lisa1986.com then you will have to upload these php files on your server in a directory and use the url to post via ajax.

    The second error is based on HTML element. In the js, an element is use to get its value or parameters but that element isn't present in the html code of webpage. You have to either create that element or assign id/class of that element to the accurate element in your webpage or you have to remove call of that element from the javascript.
     
    CodeShop, Jan 11, 2015 IP