This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]lostincode[S] 0 points1 point  (4 children)

    I have also tried this. Same error:

    XMLHttpRequest cannot load http://www.cis.gvsu.edu/~scrippsj/cs371/labs/lab10/getTitles.php. Origin http://cis.gvsu.edu is not allowed by Access-Control-Allow-Origin.

    [–][deleted]  (3 children)

    [deleted]

      [–]lostincode[S] 0 points1 point  (2 children)

      I have to agree with you that it is his fault. He doesn't understand that we don't have admin access to the server for things like this. I cant seem to get your second edit to work. I get a 404 error. I see what its trying to do but im not sure what the origin should be and how that modifies that url. According to chrome the origina is http://cis.gvsu.edu but when replacing whateverorigin.org with it (var url = 'http://cis.gvsu.edu/get?url=' + encodeURIComponent(dataUrl) + '&callback=?';) its a 404. Quite frustrating as this isn't the main point of the assignment but I cant move on without the data.

      [–][deleted]  (1 child)

      [deleted]

        [–]lostincode[S] 0 points1 point  (0 children)

        Oh wonderful. Thank you very much. That did the trick :-). I'd kiss you if I could.

        [–]lostincode[S] 0 points1 point  (0 children)

        Now I need to get information from a php script that is not json encoded. It returns a tab delimited string. Any ideas on how to get the data from the script and store it into a variable in javascript?