Announcement

Collapse
No announcement yet.

Automatic Close pop-up Java script

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Automatic Close pop-up Java script

    Hi,

    Basically I have searched all over for this code and now I have found it, but it does not work properly. Customers need to go within the website and should be able to click on any link they would like to. These links are within the website.

    The code I am trying to complete is a automatic closing pop-up after 1 second when a customer clicks on the X to close the window or actually types a new url to exit all pages of the website.

    My website url is www.foneandsurf.com; example of the error is uploaded,

    The code I have used is:

    Main template (there are 2 main templates on my site the codes are the same in each template, 1 for brochure the other for the catalogue):

    <html><head>
    <script language="JavaScript">
    <!--
    ok=1
    function open_on_departure(url)
    {
    if (ok)
    popupWin = window.open('http://www.foneandsurf.com/acatalog/closepop.html','Closing_Down', ' width=350,height=100,')
    }
    // -->
    </script>
    </head>

    <BODY OnLoad="PreloadImages('acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif','acatalog/cathome.gif')" BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000a0" VLINK="#0000a0" ALINK="#0000a0" onUnload="open_on_departure()">

    </body>
    </html>

    The code for the pop-up html:

    <html>
    <head>
    <title>Closing Down</title>
    <script language="JavaScript">
    // (C) 2003 www.foneandsurf.com
    // http://www.foneandsurf.com
    // Free for all users, but leave in this header

    var howLong = 1000;

    t = null;
    function closeMe(){
    t = setTimeout("self.close()",howLong);
    }

    </script>
    </head>

    <body onload="closeMe()"><Actinic:TEMPLATE type="begin" filename="C:\Program Files\Actinic ecommerce v5\Sites\foneandsurf-com\closepop.html"/>
    </body>
    </html>




    This code partly works, If I was to logon to www.foneandsurf.com, and choose a link to go to the contact us page the close-pop up would still come up, If then you were to click on to a new link within the website the pop-up would still come. It also does work when you close the window or type a new url. I only need this code to work for the last two options not the first.

    How can I solve this?

    Your help would be very much appreciated.

    Thank you

    Umesh Pasricha
    www.foneandsurf.com
    020 8570 6646


    __________________
    Umesh Pasricha
    GTC Field Marketing
    www.foneandsurf.com
    020 8570 6646
    Umesh Pasricha
    GTC Field Marketing
    www.foneandsurf.com
    020 8570 6646

    #2
    Please post any responses to this message in the 'Developers' forum rather than here in order to avoid confusion.

    Click the link below to go to the thread:
    http://community.actinic.com/showthr...=&threadid=228

    Comment

    Working...
    X