Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/03/2006, 12:02
furoya
(Desactivado)
 
Fecha de Ingreso: noviembre-2002
Ubicación: Ciudad Autónoma de Buenos Aires
Mensajes: 2.367
Antigüedad: 21 años, 5 meses
Puntos: 317
Hola todos :

En realidad no quieres saber la página de inicio de tus visitantes, rex2002xp, solamente quieres ir allí desde un escript. Que no es lo mismo, porque de esta forma no estás leyendo información que el cliente no tiene por qué darte.

En IE sería todavía más fácil.

Código:
window.location.href='about:home'
A pesar de mis objeciones, dejo un viejo código a modo didáctico.

Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML XMLNS:IE>
<HEAD><TITLE> IR A PÁGINA DE INICIO NAVEGADOR.</TITLE>

<STYLE>
strong{font-weight:900}
	<!-- PARA 1er. EJEMPLO -->
@media All{IE\:homePage {behavior: url(#default#homepage)}}
	<!-- -->
</STYLE>

<SCRIPT>

function irHomePage(){
if(document.all) document.getElementById("HP").navigateHomePage();
else home();
event.returnValue=false;
}
/*
	CONFIRMA URL HOMEPAGE (true/false)
document.getElementById("HP").isHomePage("about:blank");
	ESTABLECE URL HOMEPAGE
document.getElementById("HP").setHomePage("about:blank");
*/
</SCRIPT>
</HEAD>
<BODY>

	<!-- PARA 1er. EJEMPLO -->
<IE:homepage id="Hp"></IE:homepage>
	<!-- -->

<h2>Botón con <tt>JScript</tt> para ir a <i>Home Page</i> del navegador <strong>Internet Explorer</strong> y <tt>javascript</tt> para <strong>Firefox1x+</strong> .</h2>

<center>
<button onclick="irHomePage()" id="GHJ" title="Go home/start page/página de inicio" ><b><font face="webdings" size="5"> H</font><br><font size="4" face="sans-serif"> Home</font></b></button>
</center>

<br /><br />

<hr />

<h2>Botón con <tt>VBScript</tt> para ir a <i>Home Page</i> del navegador  <strong>Internet Explorer</strong> y <tt>javascript</tt> para <strong>Firefox1x+</strong> .</h2>

<center>
<button onclick="if(!document.all)home()" id="GH" title="Go home/start page/página de inicio" ><b><font face="webdings" size="5">H</font><br><font size="4" face="sans-serif">Home</font></b></button>
</center>

<SCRIPT LANGUAGE="vbscript">

function GH_onclick
dim sAHP , i
set sAHP=createobject("shell.application")
i=0
Do Until sAHP.Windows.Item(i).LocationURL=Self.Location
i=i+1 
Loop
sAHP.Windows.Item(i).GoHome
end function

</SCRIPT>

</BODY>
</HTML>


<!--
<button  onclick="vbscript:shApp.Windows.Item(0).GoHome ">Home</button>

<SCRIPT LANGUAGE=vbscript>
option explicit
dim shApp
set shApp=createobject("shell.application")
</script>
DONDE DICE shApp.Windows.Item(0). DEBE ESTAR EL ´ITEM DE ESTA  VENTANA , SI HAY MÁS ABIERTAS; TOMA LA DEL ITEM QUE ESTÉ ESCRITO (EN EL EJEM 0 )
-->
Otra forma de salirte sería con about:blank, que no le deja la duda a tu visitante sobre si estuviste hurgando en su configuración.

Saludos.