Community Forums 

Main Content

Re:Help with nocart feature and custom popup

    Jul 19 2010 19:35:10

    #1

    Gil Sery

    Join date : 2010-04-27      Posts : 141

    GT said Try changing this line:
    setTimeout('document.forms["'+formName+'"].submit()',300); // give the window time to open

    To:
    setTimeout('document.forms["'+formName+'"].submit()',3000); // give the window time to open


    Thanks but the version with the green checkmark that I mentioned above has different code than the one that I initally posted.

    The code for that version (the one where I can't get the window to stay open long enough) is this:

    In the head:

    <script type="text/javascript">

    function ShowAlert()
    {
    document.getElementById('alert').style.display = 'block';
    }

    function HideAlert()
    {
    document.getElementById('alert').style.display = 'none';
    }

    </script>

    <style type="text/css">

    #alert
    {
    position: absolute;
    top: 40%;
    left: 40%;
    width: 358px;
    height: 144px;
    border: 1px solid #000000;
    padding: 0px 7px 0px 7px;
    background: #ECE9D8;
    font-size: 10pt;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    display: none
    }
    </style>

    In the <body>
    <FORM action="http://ww5.aitsafe.com/cf/add.cfm"; method="post">
    <INPUT type="hidden" name="userid" value="71226549">
    <INPUT type="hidden" name="product" value="Tungsten Bucking Bar #01">
    <INPUT type="hidden" name="price" value="69.95">
    <INPUT type="hidden" name="scode" value="ETBB01">
    <INPUT type="hidden" name="nocart">
    <INPUT type="hidden" name="units" value="1">
    <INPUT type="hidden" name="return" value="http://www.tungstenheavypowder.com/store/prices.html">;
    <INPUT type="image" name="submit" value="Open the pop up window" target="_blank" src="http://www.tungstenbuckingbars.com/buy_button.jpg"; alt="Buy" onclick="javascript:ShowAlert()(this.href,this.target,'358','144')">
    </FORM>

    How do I modify this code to the the popup, which activates via the onclick, to stay open long enough to be read?

    Thanks.