Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/03/2010, 22:28
moz90
 
Fecha de Ingreso: mayo-2009
Mensajes: 94
Antigüedad: 15 años
Puntos: 0
Respuesta: Login Simple con PHP ayuda plis ¡¡

Hola amigo gracias por responder weno si modifque en la hojas de estilo la posición del cartelito, weno aqui te muestro los archivos js y css, a ver si me puedes ayudar, realidad como te digo estps mismo archivos me funcionan localmente pero cuando los subo al hosting no me funcionan no entiendo a que se debera el problema....
Archivo login.js

Código:
$(document).ready(function(){ 

	var wrapperId 	=	'#wrapper';		// main container
	var waitId		=	'#wait';		// wait message container
	var formId		=	'#frmLogin';	// submit button identifier
	var userId		=	'#u';			// user input identifier
	var passId		=	'#p';			// password input identifier
	
	var waitNote	=	'Cargando...';											// loading message
	var jsErrMsg	=	'Usuario o Password invalidos.';						// clientside error message
	
	var postFile	=	'login.post.php';	// post handler
	
	var autoRedir	=	true;			// auto redirect on success
	
	// hide first
	$(waitId).hide(); $(wrapperId).hide();
	
	// FirstLoad
	$(waitId).html(waitNote).fadeIn('fast',function(){
		// get request to load form
		$.getJSON(postFile, function(data){
			
			if(data.status==true) {
				// status is authorized
				if(autoRedir){ 
					$(waitId).hide().html('Redireccionando...').fadeIn('fast', function(){window.location=data.url;});
				} else {
					$(waitId).fadeOut('slow', function(){ $(wrapperId).html(data.message).slideDown(); }).html();
				}
			} else {
				// show form
				$(wrapperId).html(data.message).slideDown('slow',function(){
					// hide  message
					$(waitId).fadeOut('fast',function(){
						
						//*/ submit handler
						$("#frmlogin").submit( function() { 
							// loading
							$(waitId).html(waitNote).fadeIn();
								
							var _u = $(userId).val();	// form user
							var _p = $(passId).val();	// form id
							
							//@ valid user ( modify as needed )
							if(_u.length<4) 
								{
									$(waitId).html(jsErrMsg).fadeIn('fast',function(){ 
										$(userId).focus();
									});
								} 
							else
								{
									//@ valid password ( modify as needed )
									if(_p.length<4)
										{
											$(waitId).html(jsErrMsg).fadeIn('fast',function(){ 
												$(passId).focus();
											});
										}
									else
										{
											$.post(postFile, { u: _u, p: _p }, function(data) {
												if(data.status==true){ 
													if(autoRedir){ 
														$(waitId).html('Redireccionando...').fadeIn('fast', function(){
															window.location=data.url;
														});
													} else {
														$(waitId).fadeOut('slow', function(){ 
															$(wrapperId).slideUp('slow',function(){
																$(this).html(data.message).slideDown();
															}); 
														}).html();
													}
												} else {
													$(waitId).html(data.message).slideDown('fast', function(){ 
														$(userId).focus(); 
													}); 
												}
											}
											,'json');
										}
								}
							return false;
						});				
						//*/
						$(userId).focus();
					}).html();
				});
				
			}
			
		 });
	});
});
login.css

Código:
@charset "utf-8";
/* CSS Document */
	html,
	body
		{
			background:#ccc;
			padding:50px;
			margin:0;
			font:normal 11px/normal arial;
			color:#000;
			text-align:center;
		}
	#wrapper
		{
			background:#666;
			border:solid 1px #fff;
			margin:0 auto;
			width:250px;
			text-align:left;
			padding:25px;
		}
	a
		{
			text-decoration:none;
			color:#000;
			border-bottom:dotted 1px #000;
		}
	a:hover
		{
			color:#000;
			border-bottom:solid 1px #000;
		}
	form
		{
			padding:15px; margin:0;
		}
	#msg
		{
		text-align:center; color:red; padding:0px 0 10px 0;
		}
	label
		{
		font-weight:bold;
		display:block;
		}
	.textfield
		{
			background:#333;
			border:solid 1px #222;
			padding:3px;
			margin:4px 0px 4px 0px;
			width:90%;
		}
	.textfield:hover,
	.textfield:focus
		{
		background:#000;
		border:solid 1px #fff;
		color:#fff;
		}
	
	.buttonfield
		{
			background:#333;
			border:solid 1px #ddd;
			color:#000;
			font:bold 11px/normal Tahoma, Verdana;
			margin-top:10px;
			padding:4px;
		}
	.buttonfield:hover,
	.buttonfield:focus
		{
			background:#000;
			border:solid 1px #fff;
			color:#fff;
		}
	#wait{
	position:absolute;
	top:29px;
	left:429px;
	background:#FF0000;
	color:#fff;
	padding:10px;
}
	#header{
	padding:5px 0px;
	width:100%;
	text-align:center;
	font:normal 10px/normal arial;
	color:#FF0000;
	}
	#extra{
	
	}
	#footer { padding:10px 0px; width:100%; text-align:center; font:normal 10px/normal arial; color:#666; }
salu2

Última edición por moz90; 21/03/2010 a las 22:31 Razón: edit tags