With some help from the fine folks on Stackoverflow, I built a small newsletter subscription submission form:
<div id="news-signup">
<form action="news.php" method="post">
<fieldset>
<input type="text" id="your-email" name="your-email" value="YOUR EMAIL ADDRESS" onfocus="if (this.value=='YOUR EMAIL ADDRESS') this.value='';" />
<input type="submit" value="::Submit Query::" id="red-submit" />
</fieldset>
</form>
</div>
Here is the jquery that replaces the form with a confirmation message:
$(document).ready(function() {
$('#news-signup form')
.validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
success: function() {
var Image = $('<img />').attr({src:'_images/register-thanks.png', width:332, height:35, alt:"Success"});
$('#news-signup form').hide();
$('#news-signup').append(Image);
}
});
}
});
});
This works perfectly on this page, but the replacement image does not kick in on this page.
I would appreciate some direction to resolve this.
Thanks.