Hi,
I've been inherited a website from another web developer and I need to fix his code. In one part of the admin system, the user selects a template for the newsletter to use, types the subject and body text into a form, then submits it using a submit button. There is no problem with this code and the user is able to send newsletters out using the standard template (there is only one template). However, they require a preview button to check it looks how they want it to on the template. to get to the preview page (preview_mailing.php?template=1), there is a Javascript preview button, which uses the following code:
Code:
<script>
function get_radio_value()
{
for (var i=0; i < document.add_form.template.length; i++)
{
if (document.add_form.template[i].checked)
{
return rad_val = document.add_form.template[i].value;
}
}
}
</script>
<a href="javascript:;" title="Preview" target="_self" class="button" onclick="MM_openBrWindow('preview_mailing.php?template=' + get_radio_value(),'preview','scrollbars=yes,width=600,height=800');return false">Preview</a>
<br/>
When you click on this button, however, it does absolutely nothing and shows javascript
:; as the link, but I'm sure this is what it is meant to show as the link?