javascript - popup show on page load and set session -


i want show popup on page load.

in below script works if user click popup button shows popup

also want set session if popup shows 1 time should not show multiple time

my.ptml

<a class="vip" data-toggle="modal" data-target="#mymodal"> popup</a>     <div style="display:none">                 <div id="mydivid">             <div class="popup-wrap">             <div class="popup-txt-01"><img src="<?php echo $this->getskinurl('images/proxelle/txt_1.png');?>"></div>             <div class="popup-txt-02"><img src="<?php echo $this->getskinurl('images/proxelle/txt_2.png');?>"></div>             <form action="<?php echo $this->geturl('proxelle/index/addme') ?>" method="post" id="proxelle">                 <input type="hidden" name="form_key" value="<?php echo mage::getsingleton('core/session')->getformkey(); ?>" />                 <input type="text" name="fname" id="only-text" placeholder="enter name here" required="true" autocomplete="off"/>                 <!-- <input type="text" name="phone" placeholder="mobile number" required="true"/> -->                 <input type="email" name="email" placeholder="enter email id here" required="true" autocomplete="off"/>                 <!--input type="text" name="lname" placeholder="last name" required="true"/-->                 <!--input type="textarea" name="address" placeholder="address" required="true"/-->                 <input type="submit" name="go">                 <div class="popup-txt-03"><img src="<?php echo $this->getskinurl('images/proxelle/txt_3.png');?>"></div>             </form>         </div>     </div>         </div> <br/>  <!--my.js-->  <script type="text/javascript"> jquery(document).ready(function($) {     $("a#fancyboxlink").fancybox({         'href'   : '#mydivid',         'titleshow'  : false,         'transitionin'  : 'elastic',         'transitionout' : 'elastic',         //'openeffect'  : 'elastic',         //'closeeffect' : 'elastic',         'openeffect'    : 'none',         'closeeffect'   : 'none',         'maxwidth'  : 800,         'maxheight' : 600,         'fittoview' : false,         'width'     : '70%',         'height'        : '70%',         'autosize'  : false,         'closeclick'    : false     });      $("#only-text").on('keyup', function(e) {         var val = $(this).val();         if (val.match(/[^a-za-z]/g)) {             $(this).val(val.replace(/[^a-za-z]/g,' '));         }     }); }); </script> 

please suggest me mistake made here


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -