Thursday 15 May 2014

javascript - Java script popup box -



javascript - Java script popup box -

dear below code popup box want disable background of wordpress page , display in exact center getting displayed in v v odd way plz view website www.kreativestudio.ca when 1 clicks on quote form box popups

my popup form table

echo "<p class=\"number\"><img src=\"http://www.kreativestudio.ca/wp-content/uploads/2013/05/call5.png\"> 647-896-7574 &nbsp;&nbsp;<a href=\"#\" onclick=\"pop('popup')\"><img src=\"http://www.kreativestudio.ca/wp-content/uploads/2013/05/getq.png\"></a></p>"; echo "<table border=\"1\" id=\"popup\">"; echo "<tr>"; echo "<td>"; echo do_shortcode('[si-contact-form form="1"]'); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "click close or escape button close it"; echo "<a href=\"#\" onclick=\"hide('popup')\">close</a>"; echo "</td>"; echo "</tr>"; echo "</table>";

my script

<script type="text/javascript"> function pop(div) { document.getelementbyid(div).style.display = 'block'; } function hide(div) { document.getelementbyid(div).style.display = 'none'; } //to observe escape button document.onkeydown = function(evt) { evt = evt || window.event; if (evt.keycode == 27) { hide('popdiv'); } }; </script>

and css

#popup { display: none; width: 300px; height: 200px; position: absolute; color: #000000; background-color: #ffffff; /* align popup window @ center of screen*/ top: 50%; left: 50%; margin-top: -100px; margin-left: -150px; }

javascript html css wordpress

No comments:

Post a Comment