Child pages
  • Xmlsubscribe with Ajax or plain Javascript
Skip to end of metadata
Go to start of metadata

BETA

This area encloses a short list of samples displaying how to make use of MailUp frontend web method Xmlsubscribe.

This same approaches can be used to run other sets of methods such as XmlchksubscriberXmlunsubscribeXmlUpdSubscriber.

Purpose of this set of samples

All current and modern web browsers have network and security restrictions. Some of these restrictions prevent a script or application from making a connection to any domain/remote server other than the one the web page originally runs from.

The below samples show the best practices to run or execute web methods starting from a simple html form and making use of most popular ajax libraries.

Requirements

For clarity, requirements will follow to each sample overview

 

Interface

All the below samples will display ( and enclose ) a simple common UI as shown in the below screen shot : 

 

 

Following to form submit you'll be returned of a confirmation message as show in this screen shot :

 

 

Samples quick overview

BEST wsAjaxXmlSubscribeNet : 

This example implements a simple .net proxy server that will execute the web method xmlsubscribe through an ajax callback

Requirements : Visual Studio 2010 or later, .net framework 3.x/4.x, your console URL
BEST wsAjaxXmlSubscribePhp : 

In this sample the ajax callback is adressed to a php proxy server that will connect to Mailup's frontend method xmlsubscribe

Requirements : Apache web server, your console URL
WORKAROUND wsAjaxXmlSubscribeJsonp : 

This sample describes a workaround for a full client side implementation of MailUp frontend web methods despite the restrictions web browser impose.

We would not encourage users to use this bit of code in production environments for several reasons :

  • it makes use of third party proxy servers and they may not comply to customers' privacy policies.
  • it can be used only whilst Ip address check feature is disabled under your console configuration
  • being a full client application approach, some data could be exposed to hijack, manipulation or unexpected/unwanted subscriptions/unsubscription processes
Requirements : Your console URL

Source code

Quick download

Download all of the three samples in one bundle from our public Github repository.

 

 

  • No labels