Jump to content

json content change fails.


wmguk

Recommended Posts

Hey,

 

I have a page that is a submit form page, and then when you sign up it is supposed to change the content of the page to a thank you. however it fails.

 

<script type="text/javascript">
	$(document).ready(function() {
		$('.close').click(function() {
			window.parent.location.reload();
		});

		$('#keep-updated').click(function() {
			$.post(
				"<?php echo FC; ?>/home/emailSignup/", {email: $('#email').val()},
			   function(data){
			   	$('#main').css('display','none');
			   	$('#main2').css('display','block');
			   }, "json");
		});		
	});
</script>
<table width="700" cellpadding="0" cellspacing="0" class="inner">
	<tr>
		<td>
	<div id="main">
		<div id="content">
				<fieldset>
					<p style="font-size: 1.8em;">Get Daily Updates By:</p>
					<div><input type="text" id="email" title="ENTER EMAIL" class="inp02" /></div>
					<div><br /><br /></div>
                        <div class="submit-btn"><img style="float: right; cursor: pointer; padding-right: 50px" id="keep-updated" src="<?php echo WEB_ROOT ?>images/submit-btn.gif" /></div>
				</fieldset>
		    <p class="wo-white">Or</p>
			    <p class="wo-white"><a href="http://twitter.com/<?php echo $twitter ?>/" target="_blank"><em><img src="<?php echo WEB_ROOT ?>images/icon-twitter.jpg" alt="" /></em><span>Follow on Twitter</span></a></p>
			    <p class="wo-white">Or</p>
			<p class="wo-white"><a href="<?php echo $fb_url ?>" target="_blank"><em><img src="<?php echo WEB_ROOT ?>images/icon-facebook.jpg" alt="" /></em><span>Become a Facebook Fan</span></a></p>						
		</div>
	</div>

			<div id="main2" style="display: none; padding: 10px;">
				<h1>Thanks for signing up for snippa updates!</h1>
				<p>Now check your email: Please check your email to verify your email address</p>
				<a style="display: block; margin-right: 10px;" class="close-btn close">Close</a>				
			</div>
		</td>
	</tr>
</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.