Chce srobić PopUp z formularzem zapisu.
Wszystko działa z ale tylko wtedy jak z kodu wywale kod formularza: od <form> do </from>
Czy Pomogli byście mi? Jak to zrobić?
W pliku HTML:
W pliku popup.js:
function WHCreateCookie(name, value, days) { document.cookie = name+"="+value+expires+"; path=/"; } function WHReadCookie(name) { var nameEQ = name + "="; for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } window.onload = WHCheckCookies; function WHCheckCookies() { if(WHReadCookie('popup') != 'T') { var message_container = document.createElement('div'); message_container.id = 'cookies-message-container'; var html_code = '<div id="cookies-message" style="position: fixed; font-size: 14px; margin:0px; margin-left:0px; padding-top:100px; top:0px; padding-left:0px; padding-right:0px; padding-bottom:0px; height: 100%; width: 100%; clear: both; bottom:0px; background:url(bg.png); z-index:900;"> <div style=" margin-left:auto; margin-right:auto; background-color: #ffffff; width: 700px; height:550px; "> <a href="java script:WHCloseCookiesWindow();" id="accept-cookies-checkbox" name="accept-cookies" style="background-color: #91BE07; margin-top:10px; padding: 5px 10px; color: #2C2C2C; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; display: inline-block; margin-left: 540px; text-decoration: none; cursor: pointer;">Nie pokazuj / Zamknij</a><p><p> <div style=" margin:25px;"><img src="popup.jpg" /></div><div style="background:#91BE07; height:100px; padding-top:25px;"><center> <form class="netmailer_form" accept-charset="UTF-8" method="POST" action="http://XXXXXXXXXXXXXXX/subscribe.php"> <table class="netmailer_table"><tbody><tr><td valign="top"><input style="margin-left:20px; padding-left:10px; padding-right:10px; height:36px; width:153px; border:0px; font-size:18px; font-weight:bold; color:#363636;" class="netmailer_input netmailer_input_text" value="Tu wpisz E-mail..." onfocus="if(this.value=='' || this.value == 'Tu wpisz E-mail...') this.value=''" onblur="if(this.value == '') {this.value=this.defaultValue}" onkeyup="keyUp();" name="email" type="text"></td> <td valign="top"><input style="background-image:url(zaprenumeruj-przycisk.jpg); width:269px; height:41px; border:0px; cursor: pointer; margin-left:50px;" class="netmailer_input netmailer_input_submit" value="" type="submit"></td></tr> <tr><td colspan="2"><p><center><input class="netmailer_input netmailer_input_checkbox" name="policy" value="1" type="checkbox"><i><font color="#545453">Oświadczam, że zapoznałem się i akceptuję</font> <a style="color:#545453; text-decoration: none;" target="_blank" href="http://ADRES-POLITYKI-PRYWATNOSCI.pl">Politykę prywatności</a></i> <input name="policyReq" value="1" type="hidden"></center></p></td></tr></tbody></table> <input name="mlid" value="14" type="hidden"><input name="req" value="email" type="hidden"><input name="coregister" value="" type="hidden"></form></center></div></div></div>'; message_container.innerHTML = html_code; document.body.appendChild(message_container); } } function WHCloseCookiesWindow() { WHCreateCookie('popup', 'T', 365); document.getElementById('cookies-message-container').removeChild(document.getElementById('cookies-message')); } function WHCloseCookiesWindow() { WHCreateCookie('popup', 'T', 365); document.getElementById('cookies-message-container').removeChild(document.getElementById('cookies-message')); }