Article View: chile.comp.programacion
Article #737Re: JavaScript y Detencion de Pagina...
From: Pintamono
Date: Fri, 19 Oct 2007 13:29
Date: Fri, 19 Oct 2007 13:29
72 lines
2903 bytes
2903 bytes
Gracias, use este metodo...
unction jsConfirmaSalida(var1,var2, var3,event)
{
var sBoton = document.getElementById("OBJETO0");
var sTexto = form["OBJETO1"].value;
var sClas = form["OBJETO2"].value;
if (sBoton.value==0 && (sClasificacion != "" || sTexto!=''))
{
event.returnValue = "Se va a Ir a la Chucha, esta seguro?";
}
}
y se llama as�:
<body onbeforeunload=jsConfirmaSalida(Var1,Var2,Var3,event)>
esto muestra un mensaje de confirmaci�n.
un poco mula quizas pero se ajusta a lo que necesito...
gato2006chile wrote:
> Cuantos links hay en la pagina?
> Dependiendo de la cantidad debieras hacer un pseudolink
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <meta content="text/html; charset=ISO-8859-1"
> http-equiv="content-type">
> <title>testeo</title>
> </head>
> <body>
> <br>
> <script languaje="javascript=" type="text/javascript">
> function Testear()
> {
> alert("Cambiando");
> window.location="http://www.microsoft.com";
> }Test</script>
> <p style="text-decoration: underline; color: rgb(51, 102, 255);"
> onclick="javascript: Testear();">Testear
> </p>
> </body>
> </html>
> Pintamono escribi�:
>> Tengo el siguiente problema, tengo que evitar que salgan de una pagina sin
>> grabar, para esto he agregado un campo oculto en el que marco con 1 o 0 .
>> Estoy ocupando el evento "onbeforeunload" el rpblema es que nol ogro
>> detener la salida cuando pinchan un link...
>>
>> probe con window.stop() pero en IE6 no me funciona, luego probe con
>> location.reload() y tampoco, probe tambien con __dopostback y nada..
>> siempre me carga la pagina pinchada por el link...
>>
>> ya no se me ocurre como hacerlo, alguien ha hecho algo parecido? o tiene
>> una idea de como hacerlo?
>>
>> gracias.
>>
>>
Technical Details
Message-ID:
<5067d205e02d0ecd1988d33b84af7a08$1@usenet.no-ip.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mailReferences:
<a234a0658d5f58d1c06d95e3182ed365$1@usenet.no-ip.com> <ff94bg$rgs$1@news.nivel5.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,da4c4c540695ed31 X-Google-Attributes: gid1593cb,public,usenet X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail From: pintamono@NoMandeWeas.kk (Pintamono) Newsgroups: chile.comp.programacion Subject: Re: JavaScript y Detencion de Pagina... Date: Fri, 19 Oct 2007 09:29:13 -0400 Organization: Usenet Chile.* http://usenet.no-ip.com Lines: 74 Message-ID: <5067d205e02d0ecd1988d33b84af7a08$1@usenet.no-ip.com> References: <a234a0658d5f58d1c06d95e3182ed365$1@usenet.no-ip.com> <ff94bg$rgs$1@news.nivel5.cl> NNTP-Posting-Host: pc-146-86-104-200.cm.vtr.net Mime-Version: 1.0 X-Trace: news.nivel5.cl 1192796948 30608 200.104.86.146 (19 Oct 2007 12:29:08 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Fri, 19 Oct 2007 12:29:08 +0000 (UTC) User-Agent: NewsPortal/0.3X RCL MOD X-Abuse: robertocl@gmail.com X-HTTP-Posting-Host: 200.27.140.110