Ver Mensaje Individual
  #23 (permalink)  
Antiguo 22/04/2013, 19:29
sQs
 
Fecha de Ingreso: abril-2013
Ubicación: Sinaloa
Mensajes: 45
Antigüedad: 11 años, 8 meses
Puntos: 0
Respuesta: Problema con serialize

Perdon no se como me equivoque al pegarlo, aqui va ahora si:

Código HTML:
<link href='http://fonts.googleapis.com/css?family=Quando' rel='stylesheet' type='text/css'>
<script src='/modules/psc_maintenancepro/js/jquery-1.8.1.min.js' type='text/javascript'></script>
<link  href='/modules/psc_maintenancepro/css/psc_maintenancepro.css' rel='stylesheet' type='text/css' media='screen' />

<script type="text/javascript">                                 
	jQuery(document).ready(function($) {

		function ShowForms() {
			if ($("#maintenance_subs").is(":hidden")) {
				$("#ribbon span.signup_news").css("display","none");
				$("#ribbon span.signup_cont").css("display","block");
				$("#contact_form").slideUp("slow");
				$("#maintenance_subs").slideDown("slow");
			}
			else {
				$("#ribbon span.signup_news").css("display","block");
				$("#ribbon span.signup_cont").css("display","none");
				$("#maintenance_subs").slideUp("slow");
				$("#contact_form").slideDown("slow");
			}
		}
		$(".contact").click(function() {
			ShowForms();
			return false;
		});
		
		$('#subscribe_form').submit(function() {
			$('#subscribe_msg').html('<p><img src="/modules/psc_maintenancepro/img/ajax-loader.gif" /></p>');
			var str = $(this).serialize();
			alert('Datos serializados: '+str);
			$.ajax({
				type: 'POST',
				url: '/modules/psc_maintenancepro/functions/subscribe.php',
				data: str,
				dataType: 'json',
				success: function(data) {
					if(data.status == 1) {
						result = '<div class="notification_ok">'+data.message+'</div>';
						$("#fields").hide();
					} else {
						result = '<div class="notification_er">'+data.message+'</div>';
					}
					$('#subscribe_msg').html(result);
				}
			});
			return false;
		});
		
		$('#contact_form').submit(function() {
			$('#contact_msg').html('<p><img src="/modules/psc_maintenancepro/img/ajax-loader.gif" /></p>');
			var dataString = $(this).serialize();
			alert('Datos serializados: '+dataString);
			$.ajax({
				type: 'POST',
				url: '/modules/psc_maintenancepro/functions/contact-us.php',
				data: dataString,
				dataType: 'json',
				success: function(data) {
					if(data.test2 == 1) {
						result = '<div class="notification_ok">'+data.test1+'</div>';
						$("#fields").hide();
					} else {
						result = '<div class="notification_er">'+data.test1+'</div>';
					}
					$('#contact_msg').html(result);
				}
			});
			return false;
		});

	});
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
	<head>
		<title>DEMO 1.5.4</title>	
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="Shop powered by PrestaShop" />
		<meta name="keywords" content="tienda, prestashop" />
		<meta name="robots" content="index,follow" />
		<link rel="shortcut icon" href="/img/favicon.ico" />
		<link href="http://localhost/themes/default/css/maintenance.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
    <div id="content">
        <p><img src="/img/logo.jpg?1324977642" width="209" height="52" alt="logo" /><br /><br /></p>
        <a class="contact_img" title="Contact us" href="#" style="display:none">Contact us</a>
        
                	<div id="ribbon" class="contact">
                            <span class="signup_cont">Contact us</span>
                            <span class="signup_news" style="display:none">Go back</span>
                     </div>
        
		<div id="maintenance_subs" style="display:none">
             <p id="message">
                Para realizar tareas de manteniniento, nuestra tienda online estar&aacute; inactiva temporariamente.<br /><br />
                Lamentamos el inconveniente y le solicitamos probar mas tarde.
             </p>
             
            <div class="cf conatiner">
                <div id="count-dwn" class="cf">
                    <!--start of canvascounter-->
                    <section id="canvascounter">
                        <div id="countDownCanvasDiv">
                            <canvas id="countDownCanvas" width="568" height="135"> </canvas>
                            <div class="alignleft circular"><span id="dayVal" class="timerFonts"></span><p id="dayTex">-days-</p></div>
                            <div class="alignleft circular"><span id="hrsVal" class="timerFonts"></span><p id="hrsTex">-hours-</p></div>
                            <div class="alignleft circular"><span id="minVal" class="timerFonts"></span><p id="minTex">-minutes-</p></div>
                            <div class="alignleft circular"><span id="secVal" class="timerFonts"></span><p id="secTex">-seconds-</p></div>
                        </div>
                        <script type="text/javascript">
                            var endDate_fetch = new Date("2013 December, 01 12:00:00");
                        </script>
                    </section>
                    <!--eof canvascounter--> 
                </div>
            </div>

            <div class="block_newsletter">
	            <div id="bn_content">
                    <form id="subscribe_form" method="post">
                        <p>
                            <label>Stay updated, subscribe our newsletter:</label> <br />
                            <input type="text" name="email" size="18" 
                                value="Your email address" 
                                onfocus="javascript:if(this.value=='Your email address')this.value='';" 
                                onblur="javascript:if(this.value=='')this.value='Your email address';" 
                                class="inputNew" />

                            <input type="text" name="email2" size="18"/>

                            <!--<select name="action">
                                <option value="0">Subscribe</option>
                                <option value="1">Unsubscribe</option>
                            </select>-->
                                <input type="submit" value="subscribe" class="button_mini" name="subsNewsletter" id="subsNewsletter"/>
                            <input type="hidden" name="action" value="0" />
                        </p>
                    </form>
                    <div id="subscribe_msg"></div>
	            </div>
            </div>
    
			 <span style="clear:both;">&nbsp;</span>
		</div>


		<div id="contact_form">
            <h1>Customer Service - Contact us</h1>
            
                            <p class="bold">For questions about an order or for more information about our products.</p>
                

                <form id="contact_form" class="std" method="post" action="">

                    <h3>Send a message</h3>
                    <p class="select">
                        <label for="id_contact">Subject Heading</label>
                        <input type="text" id="id_contact" name="id_contact" /><sup>*</sup>
                    </p>

                    <p class="text">
                        <label for="emailc">E-mail address</label>
                        <input type="text" id="emailc" name="emailc" /><sup>*</sup>
                    </p>

                    <p class="text">
                        <label for="name">Name</label>
                        <input type="text" name="name" id="name" /><sup>*</sup>
                    </p>

                    <p class="text">
                        <label for="id_order">ID Order</label>
                        <input type="text" name="id_order" id="id_order" />
                    </p>
                    
                    <p class="text">
                    	<label for="fileUpload">Attach File</label>
                        <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
                        <input type="file" name="fileUpload" id="fileUpload" />
                    </p>
                        
                    <p class="textarea">
                        <label for="message">Message</label>
                         <textarea id="message" name="message" rows="15" cols="20" style="width:460px;height:220px"></textarea><sup>*</sup>
                    </p>
                    <p class="submit">
                        <input style="width:100px" type="submit" name="submitMessage" id="submitMessage" value="Send" class="button_mini" />
                    </p>
                    <div id="contact_msg"></div>

            </form>
            		</div>

        <footer>
        	<div class="social-icon">
                    <a target="_blank" title="facebook" class="facebook" href="#">&nbsp;</a>
                    <a target="_blank" title="twitter" class="twitter" href="#">&nbsp;</a>
                    <a target="_blank" title="linkedin" class="linkedin" href="#">&nbsp;</a>
                    <a target="_blank" title="google plus" class="google-plus" href="#">&nbsp;</a>
                    <a target="_blank" title="orkut" class="orkut" href="#">&nbsp;</a>
                    <a target="_blank" title="delicious" class="delicious" href="#">&nbsp;</a>
                    <a target="_blank" title="myspace" class="myspace" href="#">&nbsp;</a>
                    <a target="_blank" title="dribbble" class="dribbble" href="#">&nbsp;</a>
            </div>
            <div class="copyright">Copyright &copy; 2013 DEMO 1.5.4 - All Rights Reserved</div>
        </footer>
	</div>
	</body>    
</html>

<script type="text/javascript" src="/modules/psc_maintenancepro/js/Main.js"> </script>
<script type="text/javascript" src="/modules/psc_maintenancepro/js/TimerUtils.js"> </script>