I recently added a SafeCracker form and it works great in all browsers. However, I keep getting the following error in IE7-9 (even though the form seems to work just fine..) The error is not present in Firefox, Safari or Chrome…
SCRIPT1006: Expected ')'
signup, line1 character 30I’ve traced the error back to a script that SafeCracker references following the form:
<a href="http://allianceforcompetitiveelectricity.com/?ACT=10&ui=core,widget,mouse,position,draggable,resizable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,ee_fileuploader,markitup,thickbox,toolbox.expose,overlay,tmpl&v=1312213360&use_live_url=y&include_jquery=y">http://allianceforcompetitiveelectricity.com/?ACT=10&ui=core,widget,mouse,position,draggable,resizable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,ee_fileuploader,markitup,thickbox,toolbox.expose,overlay,tmpl&v=1312213360&use_live_url=y&include_jquery=y</a>To track this down, I simply copied the source of a rendered page and gradually removed the scripts… this turned out to be the problem. Does anyone know a way to fix this - or has anyone else experienced this in IE?
Here is my Safecracker code:
<?php $title_ad = date('Y-m-d'); ?>
{exp:safecracker channel="ace_mailing_list" return="take-action/thanks" logged_out_member_id="4" rules:email_address="required|valid_email" json="yes"}
<fieldset>
<div id="close-button"></div>
<h2>Sign up for E-mail Alerts</h2>
<p> <!-- Hidden Fields --><br />
<input type="hidden" name="title" value="Mailing List Entry <?= $title_ad ?>" /><br />
<!-- End Hidden Fields --><br />
<ul class="form"><br />
<li><br />
<label for="first_name">First Name:</label><br />
<input type="text" name="first_name" id="first_name" size="20" maxlength="100" /><br />
</li><br />
<br />
<li><br />
<label for="last_name">Last Name:</label><br />
<input type="text" name="last_name" id="last_name" size="20" maxlength="100" /><br />
</li><br />
<br />
<li><br />
<label for="email_address">E-mail Address:<span class="required">*</span></label><br />
<input type="email" name="email_address" id="email_address" size="20" maxlength="100" /><br />
</li><br />
<br />
<li><br />
<input type="submit" value="Submit" /><br />
</li><br />
</ul><br />
<div id="result"></div><br />
</fieldset><br />
{/exp:safecracker}