rendered paste body<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html> <head> <title>Råd med råd - tävlingar</title> <script src="mootools.js" type="text/javascript"></script><style type="text/css">#errors { background: #222; color: #fff; padding: 10px; margin: 20px; border: 10px solid pink;}</style> <script type="text/javascript">function checkFields(form1) {missinginfo = '';if (document.form1.namn.value == "") {missinginfo += "\n - Namn";}if ((document.form1.epost.value == "") || (document.kontakt.Email.value.indexOf('@') == -1) || (document.kontakt.Email.value.indexOf('.') == -1))missinginfo += "\n - Epost";if (!document.form1.postnummer.value.match(/(\D){5}/) || document.form1.postnummer.value == "" ) {missinginfo += "\n - Postnummer";}if(document.form1.postadress.value == "") {missinginfo += "\n - Postadress";}if(document.form1.mobil.value.match(/(07(0|3|6)\d{7})/) || document.form1.mobil.value == ""){missinginfo += "\n - Mobil";}if(document.form1.slogan.value == ""){missinginfo += "\n - Motivering";}if (missinginfo != "") {missinginfo ="\n" +"Du har inte fyllt i fälten:\n" +missinginfo + "\n" +"\nFyll i de angivna fälten innan du skickar formuläret!";document.getElementById("errors").innerHTML = missinginfo.replace(/\n/gi,"<br />");return false;}else return true;}var slide;window.addEvent('domready', function() {slide = new Fx.Slide('errors');window.onload = slide.hide();});function check_form(e) {if ( checkFields('form1') == false ) {slide.slideIn();new Event(e).stop();}}$('form1').addEvent('submit', check_form); </script> </head> <body> <form id="form1" method="post" name="form1" action="?ID=1"> <fieldset> <legend><strong>Tävlingsformulär </strong></legend> <p> </p> <p><strong> Vad kallas den konkurrerande tekniken till plasman?</strong></p> <p><label> <input type="radio" name="svar" value="1" />LSD</label> <br /><label> <input type="radio" name="svar" value="2" />LCD</label> <br /><label> <input type="radio" name="svar" value="3" />LED</label> </p><p><br /></p><p> <strong> Kontaktuppgifter:</strong></p> <p><label> Namn: <input name="namn" type="text" id="namn" size="50" /> </label></p> <p> <label> Gatuadress: <input name="gatuadress" type="text" id="gatuadress" size="50" /> </label> </p> <p> <label> Postnummer: <input name="postnummer" type="text" id="postnummer" size="50" maxlength="5" /> </label> </p> <p> <label> Postadress: <input name="postadress" type="text" id="postadress" size="50" /> </label> </p> <p> <label> E-postadress: <input name="epost" type="text" id="epost" size="50" /> </label> </p> <p> <label> Mobiltelefon: <input name="mobil" type="text" id="mobil" size="50" /> </label> </p> <p> </p> <p> <strong> Tipsa minst tre kompisar om tävlingen</strong></p> <p> <label> E-postadress 1: <input name="kompis[]" type="text" size="50" /> </label></p> <p> </p> <p> <strong> Motivera med max 25 ord varför du vill vinna Pioneer PDP-428XD.</strong></p> <label> <div align="left"> <textarea name="slogan" id="slogan" cols="88" rows="6"></textarea> </div></label><div id="errors"></div> <p style="text-align: center"><label></label> <input type="submit" name="submit" id="submit" value="Tävla nu" /> <input type="reset" name="reset" id="reset" value="Rensa" /></p> </fieldset> </form> </body></html>