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
https://forums.phpfreaks.com/topic/195005-json-content-change-fails/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.