<%@ Language="VBScript" %>
<!--#include file="conexion.asp" -->
<%
sub generaPaises()
Set B_REGIONES = Server.CreateObject("ADODB.Recordset")
set B_REGIONES=connBM.execute("BM_BUSCA_REGIONES ")
' Voy imprimiendo el primer select compuesto por los paises
Response.Write "<select class=""combo"" id=""select_0"" name=""select_0"" onChange=""cargaContenido()"" style='width: 260px;'>"
While not B_REGIONES.EOF
Response.Write "<option value='"& B_REGIONES("BM_ID_REGION") &"'>" & B_REGIONES("BM_REGION") & "</option>"
B_REGIONES.MoveNext
Wend
Response.Write "</select>"
B_REGIONES.Close
End sub
Set B_REGIONES = Server.CreateObject("ADODB.Recordset")
Response.CodePage = 1252
Response.CharSet = "windows-1252"
TXT_TUTULO_PRODUCTO_ = Request.querystring("TXT_TITULO")
oid_oferta = Request.querystring("id_oferta")
alerta_1 = Request.QueryString("rs")
if alerta_1="1"then
%>
<script> alert("usuario ya existe ")</script>
<%end if %>
<%if alerta_1="2"then %>
<script> alert("Las contraseñas deben coincidir")</script>
<%end if %>
<!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">
<head>
<meta name="Barrio Meiggs" contents="Barrio Meiggs, Productos, Locales Estación Central. Jugueterias, Novedades, Adornos, Navidad, Año Nuevo, Fiestas, Disfrases, Juegos, Deportes, Cotillon, Articulos de Temporada, Electronica, Utiles Escolares, Utiles de Aseo, Fiestas Patrias, Etc, Seguridad, Muchos Locales, Arriendo, BarrioMeiggs, Meigs, Meyg, " lang="es">
<meta http-equiv="Content-Type" charset="iso-8859-1"/>
<link rel="stylesheet" type="text/css" href="css/formularios.css">
<script src="Scripts/jquery-1.9.0.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/jquery.ketchup.css" type="text/css" media="screen" />
<script src="Scripts/jquery.ketchup.all.min.js" type="text/javascript"></script>
<title></title>
<script language="javascript">
$(document).ready(function () {
$('#contacto').ketchup({}, {
'.required' : 'required',
'#comentario': 'minlength(10)',
'#email': 'email',
'#txtCant': 'number'
});
$('#b_region').change(function () { llenarselect(); });
});
function conMayusculas(campo)
{
campo.value = campo.value.toUpperCase()
}
function validarTexto(e)
{
tecla = (document.all) ? e.keyCode : e.which;
if (tecla==8) return true;
te = String.fromCharCode(tecla);
return patron.test(te);
}
</script>
<script language="javascript" type="text/javascript">
function nuevoAjax()
{
/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
lo que se puede copiar tal como esta aqui */
var xmlhttp=false;
try
{
// Creacion del objeto AJAX para navegadores no IE
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
// Creacion del objet AJAX para IE
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(E) { xmlhttp=false; }
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); }
return xmlhttp;
}
function cargaContenido()
{
var valor=document.getElementById("select_0").options[document.getElementById("select_0").selectedIndex].value;
if(valor==0)
{
// Si el usuario eligio la opcion "Elige", no voy al servidor y pongo todo por defecto
combo=document.getElementById("select_1");
combo.length=0;
var nuevaOpcion=document.createElement("option"); nuevaOpcion.value=0; nuevaOpcion.innerHTML="Selecciona Pais...";
combo.appendChild(nuevaOpcion); combo.disabled=true;
}
else
{
ajax=nuevoAjax();
ajax.open("GET", "llenarprovincia.asp?id="+valor, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==1)
{
// Mientras carga elimino la opcion "Elige pais" y pongo una que dice "Cargando"
combo=document.getElementById("select_1");
combo.length=0;
var nuevaOpcion=document.createElement("option"); nuevaOpcion.value=0; nuevaOpcion.innerHTML="Cargando...";
combo.appendChild(nuevaOpcion); combo.disabled=true;
}
if (ajax.readyState==4)
{
document.getElementById("fila_2").innerHTML=ajax.responseText;
}
}
ajax.send(null);
}
}
</script>
</head>
<body >
<img src="img/fondo.jpg" alt="texto alternativo" id="fondo" />
<div id="form-wrapper">
<form id="contacto" action="Para_usuario.asp" method="POST" onload="cargaContenido()" >
<table id="background-image">
<tr >
<th align="center">Registro<br><br>
<a>Nombre : </a><input name="txtNombre_usu" type="text" size="40" class="required" maxlength="50" onKeyPress="return validarTexto(event);" /><br><br>
<a>Apellido :</a> <input name="txtApellido_usu" type="text" size="40" class="required" maxlength="50" onKeyPress="return validarTexto(event);" /><br><br>
<div id="fila_1">Región : <% generaPaises() %></div><br>
<div id="fila_2">Provincia :
<select class="combo" disabled="disabled" id="select_1" name="select_1" style='width: 282px;'>
<option id="valor_defecto" value="0">Elija Región...</option>
</select>
</div><br>
<a>Em@il :</a> <input name="txtemail_usu" type="text" id="email" size="40" maxlength="50" onKeyPress="return validarTexto(event);" /><br><br>
<a>Contraseña :</a> <input name="txtpassword_usu" type="password" size="40" class="required" maxlength="50" onKeyPress="return validarTexto(event);" /><br><br>
<a>Contraseña :</a> <input name="txtpassword1_usu" type="password" size="40" class="required" maxlength="50" onKeyPress="return validarTexto(event);" /><br><br>
<a width="182"></a><img src="aspcaptcha.asp" alt="This Is CAPTCHA Image" width="86" height="21" /><br>
<input name="strCAPTCHA" type="text" id="strCAPTCHA" maxlength="8" /><br><br>
<input type="hidden" name="id_2" value="1"/>
<input name="submit" type="submit" value="Registrarse"/>
</th>
</tr>
</table>
</form>
</div>
</body>
</html>