Hi,
I am trying to get the following code to integrate and work properly in Kuroi's Blank Sidebox.
It's essentially a simple phplist subscription with a field and subcribe button. I put the code in tpl_blank_sidebox.php but it gave me this error. The above code works fine if it wasn't in a sidebox. Please advise. Thank you.Code:<script language="Javascript" type="text/javascript"> var fieldstocheck = new Array(); fieldnames = new Array(); function checkform() { for (i=0;i<fieldstocheck.length;i++) { if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") { alert("Please enter your "+fieldnames[i]); eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()"); return false; } } return true; } function addFieldToCheck(value,name) { fieldstocheck[fieldstocheck.length] = value; fieldnames[fieldnames.length] = name; } function compareEmail() { return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value); } </script><form method=post action="http://www.dealbyethan.com/newsletters/?p=subscribe&id=1" name="subscribeform" target="windowName" onsubmit="window.open('', this.target, 'dialog,modal,scrollbars=no,resizable=no,width=550,height=300,left=0,top=0');"><style type="text/css"> div.adminmessage { width: 100%; border: 2px dashed #000000; padding: 10px; margin-bottom: 15px; background-color: #E7BE8F; } </style> Email: <input type=text name=email value="" size="15"> <script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script> <input type="hidden" name="list[3]" value="signup"><input type="hidden" name="listname[3]" value="Mens Clothing"/><input type=submit name="subscribe" value="Subscribe" onClick="return checkform();"> </form>
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING



