www.webdeveloper.com
Results 1 to 6 of 6

Thread: Email Optout

  1. #1
    Join Date
    Oct 2012
    Posts
    29

    Email Optout

    I need to create an email optout application with JavaScript. Haven't done this kind of app before. So I appreciate it if you could tell me the steps to go around this.

    I am not a JS guru either. I have used JS snippets within HTML, but not this kind of application that is completley written in JS. So I will be thankful if you tell me how and where to start the coding for this app. I dont want you to write the code for me, but rather how to start and what would be the building blocks in plain text? Hope you know what I mean. I am a bit lost on how and where to start, otherwise the coding will be no problem once I know what to do.

    BR
    Atrisa

  2. #2
    Join Date
    Mar 2009
    Posts
    497
    1. If you're sending a form to the user just use a checkbox to reflect that choice and send it like any other element in the form. No javascript needed.
    2. If its a separate widget you can also include it as an iframe containing a small form which allows them to opt out. That won't cause a reload of the entire page, just the iframe. Again, no javascript needed.
    3. If you must use javascript then use AJAX to send that data.

  3. #3
    Join Date
    Mar 2012
    Posts
    1,563
    Why use Javascript? Presumably you will need to store the optout in a server-side database? Therefore the simplest and most straightforwards way of doing that is with the language appropriate to the database engine. E.g. PHP for MySQL.

  4. #4
    Join Date
    Jul 2012
    Posts
    57
    jedaisoul is right, with js on your sever, anyone can access it. What you describe sounds user specific.

  5. #5
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,348
    Quote Originally Posted by Atrisa Milani View Post
    I need to create an email optout application with JavaScript. Haven't done this kind of app before. So I appreciate it if you could tell me the steps to go around this.

    I am not a JS guru either. I have used JS snippets within HTML, but not this kind of application that is completley written in JS. So I will be thankful if you tell me how and where to start the coding for this app. I dont want you to write the code for me, but rather how to start and what would be the building blocks in plain text? Hope you know what I mean. I am a bit lost on how and where to start, otherwise the coding will be no problem once I know what to do.

    BR
    Atrisa
    First to address the comment in your opening line.

    The regulations for a vast majority of the world changed and any kind of option for things like email have to be an opt-in option. They used to be an opt-out option but too many people signing up to forums and suchlike were not unckecking and the spam rocketed.

    What you want is a javascript that pops up an alert or a confirmation prompt that is a fallback to notify the user that a newsletter exists and if they want to join then they need to click on OK otherwise Cancel

    To demonstrate
    Code:
    c = confirm("Click OK to sign up to news letter or cancel to continue");
    msg = (c)?"OK":"Cancel";
    alert( msg );
    Then using JavaScript to check the box for the user if the value of 'c' is true otherwise allow the page to continue with its submission.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  6. #6
    Join Date
    Oct 2012
    Posts
    29
    Thank you all for your replies and comments. I am building the optout app on a marketing software. The markering software has millions of users who have registered with it for digital marketing emails and who get emails from it on certain times. So when a user clicks the optout link, browser opens and the optout app gets the person's id (which is ciphered). Then the app redirects the user to customer's website with a cookie attached. Then user gets the optout page, where user gets a message saying 'are you sure you want to optout', and he/she clicks YES. After this the user is served with an OK page linked to the optout app. The optout app after receiving the information replies to the browser with an 'Opt out completed message' and at the same time using the recipient's id, unsubscribes that user from the subscribers' list and writes the data to the optout table in the database used by the marketing software.

    As I said the whole idea is new to me and this all I have got from it so far

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles