Community Forums 

Main Content

Re:Help with nocart feature and custom popup

    Jul 19 2010 19:35:10


    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

    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';


    <style type="text/css">

    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

    In the <body>
    <FORM action=""; 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="">;
    <INPUT type="image" name="submit" value="Open the pop up window" target="_blank" src=""; alt="Buy" onclick="javascript:ShowAlert()(this.href,,'358','144')">

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