Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery get and post

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #44190
    Htmlmainiac
    Member

    I have some JavaScript that is trying to Ajax to a file on someone else’s server and I need to send post ang hat data at the same time but I can’t.

    #132204
    Htmlmainiac
    Member

    Help someone

    #132210
    CrocoDillon
    Participant

    Not sure if that’s even possible with same origin policy.

    #132211
    ghafirsayed
    Member

    STOP SPAMMING ON CSS-TRICKS.

    #132216
    CrocoDillon
    Participant

    Did you just made an alias to piss on @Htmlmaniac?

    #132246
    Htmlmainiac
    Member

    Yes he thinks I’m a spammer. And I’m using jsonp to get round the same origin policy.

    #132247
    Htmlmainiac
    Member

    I’m using http://www.pandorabots.com/botmaster/en/home and I have access to the file with custom html for the bot but it has to be on their server.

    #132248
    pixelgrid
    Participant

    to properly use jsonp the requested json code should be wrapped in a function call which you have to declare on your code before making the call.Also the error logged in the console could help

    #132250
    Htmlmainiac
    Member

    I am doing that but it need to send get data in the url to get to the bot and post data to send the input and session id

    #132252
    pixelgrid
    Participant

    $.ajax({
    type: “GET”,
    url: “www.example.com/query?var1=value1?var2=value2?callback=callbackFunctionName”,
    dataType: “jsonp”
    });

    give this one a try [edited insert callback in the query]

    #132254
    Htmlmainiac
    Member

    Yes but i need to do this:

    $.ajax({
    url: ‘http://www.pandorabots.com/pandora/talk?botid=9428f08a6e344b33’,
    data: {
    ‘input’: text
    },
    dataType: ‘jsonp’,
    jsonpCallback: ‘jsonp’,
    type: ‘POST’,
    success: function (data) {
    console.log(data);
    }
    });

    #132262
    Htmlmainiac
    Member

    I sorted it with ajaxing to a php file witch did a curl to the file i was previously ajaxing to.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.