The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    How to add a pop up when someone visits the site

    avatar
    CarpCharacin
    Forumember


    Male Posts : 44
    Reputation : 1
    Language : English

    Solved How to add a pop up when someone visits the site

    Post by CarpCharacin November 5th 2014, 12:39 am

    I have the popup code here

    Code:
    <script language="javascript"><!--

    function PopUp() {

       var TheURL = "http://www.thepetitionsite.com/985/921/022/ban-bowls-pt-2/";
       var PopWidth = "1200";
       var PopHeight = "500";
       var PosTop = "";
       var PosLeft = "";

       var SettingS = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + PopWidth + ",height=" + PopHeight + ",top=" + PosTop + ",left=" + PosLeft;
       var PopUp = open(TheURL,"box",SettingS);
    }

    window.onload=PopUp;

    // -->
    </script>
    Where do i add it to my site to make the pop up work?  This code is to open my petition in a new window when someone visits my forum


    Last edited by CarpCharacin on November 5th 2014, 5:33 am; edited 1 time in total
    Ramdaman
    Ramdaman
    Active Poster


    Male Posts : 1590
    Reputation : 99
    Language : English, Albanian, Macedonian, Russian | HTML, CSS
    Location : New York City

    Solved Re: How to add a pop up when someone visits the site

    Post by Ramdaman November 5th 2014, 1:57 am

    Go to your Administration Panel => Modules => HTML and Javascript => JavaScript Codes Management
    avatar
    CarpCharacin
    Forumember


    Male Posts : 44
    Reputation : 1
    Language : English

    Solved Re: How to add a pop up when someone visits the site

    Post by CarpCharacin November 5th 2014, 2:08 am

    Ramdaman wrote:Go to your Administration Panel => Modules => HTML and Javascript => JavaScript Codes Management
    I put my code in there and it did not work.  I made sure my op ups were not blocked and tried it in google chrome and internet explorer
    avatar
    CarpCharacin
    Forumember


    Male Posts : 44
    Reputation : 1
    Language : English

    Solved Re: How to add a pop up when someone visits the site

    Post by CarpCharacin November 5th 2014, 2:11 am

    you can try it to see if the pop up works from a different internet connection.  Here is the link http://carpkeeping.userboard.net/
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: How to add a pop up when someone visits the site

    Post by SLGray November 5th 2014, 2:56 am

    Did you activate JavaScript Management and check in all pages?



    How to add a pop up when someone visits the site Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    CarpCharacin
    Forumember


    Male Posts : 44
    Reputation : 1
    Language : English

    Solved Re: How to add a pop up when someone visits the site

    Post by CarpCharacin November 5th 2014, 3:18 am

    SLGray wrote:Did you activate JavaScript Management and check in all pages?
    i activated javascript management but i do not want my pop up to appear on all pages.  Just when someone goes to the index i want it to pop up.

    UPDATE: i tried all pages and it still did not work.


    Last edited by CarpCharacin on November 5th 2014, 3:21 am; edited 1 time in total (Reason for editing : update)
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How to add a pop up when someone visits the site

    Post by Ange Tuteur November 5th 2014, 5:24 am

    Hello CarpCharacin,

    Try this :
    Administration Panel > Modules > JavaScript codes management > Create a new script

    Title : Your choice
    Placement : in the homepage
    Paste the code below :
    Code:
    function PopUp() {

      var TheURL = "http://www.thepetitionsite.com/985/921/022/ban-bowls-pt-2/";
      var PopWidth = "1200";
      var PopHeight = "500";
      var PosTop = "";
      var PosLeft = "";

      var SettingS = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + PopWidth + ",height=" + PopHeight + ",top=" + PosTop + ",left=" + PosLeft;
      var PopUp = open(TheURL,"box",SettingS);
    }

    window.onload=PopUp;
    avatar
    CarpCharacin
    Forumember


    Male Posts : 44
    Reputation : 1
    Language : English

    Solved Re: How to add a pop up when someone visits the site

    Post by CarpCharacin November 5th 2014, 5:32 am

    Ange Tuteur wrote:Hello CarpCharacin,

    Try this :
    Administration Panel > Modules > JavaScript codes management > Create a new script

    Title : Your choice
    Placement : in the homepage
    Paste the code below :
    Code:
    function PopUp() {

     Â  var TheURL = "http://www.thepetitionsite.com/985/921/022/ban-bowls-pt-2/";
     Â  var PopWidth = "1200";
     Â  var PopHeight = "500";
     Â  var PosTop = "";
     Â  var PosLeft = "";

     Â  var SettingS = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + PopWidth + ",height=" + PopHeight + ",top=" + PosTop + ",left=" + PosLeft;
     Â  var PopUp = open(TheURL,"box",SettingS);
    }

    window.onload=PopUp;
    Thanks a lot!!!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How to add a pop up when someone visits the site

    Post by Ange Tuteur November 5th 2014, 5:37 am

    You're welcome ^^

    Topic archived

      Current date/time is September 23rd 2024, 4:22 am