ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Posting to an external URL with Ajax and Expression Engine

January 10, 2011 6:31am

Subscribe [1]
  • #1 / Jan 10, 2011 6:31am

    HelloComputer

    2 posts

    Hi there,

    I am trying to create a signup page that allows the user to insert their name, surname and email address so they can be added to a mailing list.

    The users email address needs to be added to an external mailing application(on a different server), via a jquery GET request as well as Freeform(Expression engine plugin).

    I am having trouble sending the jquery GET request from expression engine. The user details are being added correctly to the Freeform plugin.

    This is the code I’m using to send from EE, once the form has validated:

    $.get("https://www.MAILINGAPPLICATION.com/add_email.aspx?username=bob&password=bob", { Email:$('#email').val() },
               function(data){
                 alert("Data Loaded: " + data);
               });

    This is a standard task but I can’t get it working.

    Any reason why this shouldn’t work?

    Thanks.

  • #2 / Jan 10, 2011 12:07pm

    Brandon Jones

    5500 posts

    Hi HelloComputer,

    Since that request is generated by the client (browser) and not EE itself, I’ll need to shift this over to the CodeShare Corner. I’d suggest using a tool such as Firebug or Chrome’s developer tools to determine if the request is properly being sent and what the reply is.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases