Download option in popupninja

Discussion in 'Popup Ninja WordPress Plugin' started by raaj95, Jun 16, 2015.

  1. raaj95

    raaj95 Member

    Joined:
    May 29, 2015
    Messages:
    133
    Likes Received:
    0
    when user enter name and email then a file download on his system ( free ebook ) how this on popup ninja. please guide me.
     
  2. Sobhagya

    Sobhagya Guest

    Joined:
    May 29, 2015
    Messages:
    414
    Likes Received:
    6
    Hello,

    Greetings from InkThemes,

    It would be our pleasure to serve you.

    Your requirement is possible only through customizing the source code of "PopupNinja"

    Let me know
     
  3. raaj95

    raaj95 Member

    Joined:
    May 29, 2015
    Messages:
    133
    Likes Received:
    0
    ok please provide this
     
  4. Sobhagya

    Sobhagya Guest

    Joined:
    May 29, 2015
    Messages:
    414
    Likes Received:
    6
    Hello,

    Hope Doing Good,

    Kindly follow the below step mentioned in the image.

    customize step for download eboook step 1.png

    customize step for download eboook step 2.png

    Use below code in specific area

    Code:
    onclick="downloadEBook()" 
    and

    Code:
    function downloadEBook() {
            function validation() {
                var name = document.getElementById("name").value;
                var email = document.getElementById("email").value;
                var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
                if (name === '' || email === '') {
                    return false;
                } else if (!(email).match(emailReg)) {
                    return false;
                } else {
                    return true;
                }
            }
     
            if (validation()) // Calling validation function
            {
                var link = document.createElement('a');
                link.href = 'https://bitcoin.org/bitcoin.pdf';  // use realtive url
                link.download = 'MyToy.jpeg';
                document.body.appendChild(link);
                link.click();
            }
    If you unable to customize code please send your dashboard details at [email protected]. I will forward it to our technical support team they will solve your issue.

    So send us following information.

    Website URL :
    WordPress Dashboard Username :
    WordPress Dashboard Password :

    We will check it.

    Waiting for your reply.
     
  5. raaj95

    raaj95 Member

    Joined:
    May 29, 2015
    Messages:
    133
    Likes Received:
    0
    i apply this code but not working... where i upload e-book for subscriber download...

    i will send you...email
     

Share This Page