Foros del Web » Programando para Internet » Javascript »

Como saber si abro un directorio y si no mostrar un error

Estas en el tema de Como saber si abro un directorio y si no mostrar un error en el foro de Javascript en Foros del Web. [B] hola, buenas a todos ojala alguien pueda ayudarme. Desde mi web hago link a un directorio o carpetas remotas en una intranet si mi ...
  #1 (permalink)  
Antiguo 13/05/2011, 13:43
 
Fecha de Ingreso: abril-2011
Mensajes: 41
Antigüedad: 13 años
Puntos: 0
Información Como saber si abro un directorio y si no mostrar un error

[B] hola, buenas a todos ojala alguien pueda ayudarme. Desde mi web hago link a un directorio o carpetas remotas en una intranet si mi maquina esta en dominio no hay me lleva hacsta alla. pero si la maquina no esta en dominio deberia mostrar un mensaje de error diciendo la solucion para el problema solo poner la maquina en dominio y ya. no se como hacer eso, como saber o comprobar que mi directorio no abre desde javascript para mandar a salir el error o la alerta. Por que no lo quiero mostrar cada ves que le de al link mostrar la alerta seria muy fastidioso.
Como saber o comprobar que encontro la ruta de la carpeta o no para poder poner la condicion de que salga la ventana de error cual seria la condicion.

la ruta es la que esta en la funcion entrar()

Código:
<?php 
/*==================================================================================================
NOMBRE: ALMACEN.PHP
DESCRIPCIÓN: PERMITE BUSCAR Y MOSTRAR LA INFORMACIOJN DE UN ALMACEN 
===================================================================================================*/
session_start();
$usu_autentico= isset($_SESSION['autentificado'])?$_SESSION['autentificado']:'';
if ($usu_autentico != "SI")
{
	session_destroy();
		 header("Location: ../html/error_login.html");
    exit();
}

?>

	function entrar()
	{
		alert("ENTRO");
		ventanaDestino=window.open('file://///stotel02/ait/');
		
		if (window.open('file://///stotel02/ait/')==false) 
			alert('ERROR, No se Encontro la ruta');
		
	}
</script>

<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK REL="SHORTCUT ICON" HREF="../php/arqait_3.png">
<Title>Arq - AIT - er-bare1</Title>
<link href="../css/pdvsaStyle.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {font-family: Arial}
.Estilo2 {color: #FFFFFF}
.Estilo3 {font-size: 9px}
.Estilo4 {font-size: 12px}
.Estilo5 {font-size: 12}
-->
</style>
</HEAD>
<script type="text/javascript" src="../js/funciones.js"></script>
<BODY topmargin="10" leftmargin="50" marginheight="10" marginwidth="50" >
<div align="center"></div>
<table 
	width="1025" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>	
		<td 
			colspan="3" background="../img/barra_pdvsa.png" height="36" align="right" class="titulo_cabecera">
			<div 
				align="left">
			</div>	
	 		<table 
				width="100%" cellpadding="0" cellspacing="0">
				<tr>
	    			<td 
						width="82%" height="27" class="bienvenido" > <div align="right"><span class="Estilo1"><span class="Estilo2"><span class="Estilo3"><span class="Estilo4"><span class="Estilo5"><strong><font face="Arial">Bienvenido</font></strong>:<font face="Arial"><?php echo $_SESSION["usuario"]; ?></font><font face="Arial"></font></span></span></span></span></span>
					</div></td>
			  <td 
						width="2%" class="bienvenido" >&nbsp;</td>
			  <td 
						width="2%" class="bienvenido" ><img src="arqait_4.png" width="26" height="23" /></td>
			  <td 
						width="2%" class="bienvenido" >&nbsp;</td>
			  <td 
						width="12%" class="bienvenido" >&nbsp;</td>
			  </tr>
			</table>
		</td>
	</tr>
	<tr>
	</tr>
	<tr>
		<td>
		</td>
	    <td 
			width="1006">
			<div 
				align="left"><img src="../img/linea_roja.png" width="1024" height="4" />
			</div>
		</div></td>
		<td 
			width="10">
		</td>
	</tr>
	<tr>
		<td>
			<img src="../img/sombra2.png" width="9" height="20" />
		</div></td>
		<td 
			height="29" background="../img/barra_gris.png">
		    <table 
				width="100%" cellpadding="0" cellspacing="0">
				<tr>
			    	<td width="3%" align="center"><div align="center" title="Finalizar Sesión"><a href="../index.php" ><img src="../img/finalizar_sesion.png" width="18" height="18" alt="Finalizar Sesi&oacute;" border="0" title="Finalizar Sesión" style="CURSOR: pointer"/></a></div></td>
					<td width="3%" align="center"><div align="center" title="Ir a Inicio"><a href="../php/ait.php" ><img src="../img/inicio.png" width="18" height="18" alt="Inicio" border="0" title="Inicio" style="CURSOR: pointer" /></a></div></td>
					<td width="3%" align="center"><div align="center" title="Subir un Nivel"><A HREF="ait.php" ><IMG SRC="go_up.png"  width="18" height="18" alt="Inicio" border="0" title="Subir un Nivel" style="CURSOR: pointer" /></a></div></td>
					<td width="79%" align="center">&nbsp;</td>
					<td width="3%" align="center"><div align="center" title="Ir a Nagios"><a href="http://167.175.55.104/nagios/cgi-bin/status.cgi?hostgroup=all&style=hostdetail&sorttype=2&sortoption=8" target="_blank"><img src="../img/nagios.png" width="18" height="18" alt="Nagios" border="0" title="Nagios" style="CURSOR: pointer" /></a></div></td>
					<td width="3%" align="center"><div align="center" title="Ir a Siguard"><a href="http://webori.pdvsa.com/siguard/" target="_blank"><img src="../img/reloj_pdvsa1.png" width="19" height="18" alt="Siguard" border="0" title="Siguard" style="CURSOR: pointer" /></a></div></td> 
					<td width="3%" align="center"><div align="center" title="Ir a View"><a href="http://webori.pdvsa.com/view" target="_blank"><img src="../img/view1.PNG" width="18" height="18" alt="View" border="0" title="View" style="CURSOR: pointer" /></a></div></td> 
					<td width="3%" align="right" class="bienvenido">  <script language="javascript"> fecha1(); </script>&nbsp;&nbsp;</td>
				</tr>
          	</table>
		</div></td>
		<td><div align="left"><img src="../img/sombra2.png" width="9" height="20" /></div></td>
	</tr>
	<tr>
    	<td height="27" class="bienvenido" >&nbsp;</td>
			      <td align="center"><div align="left"><strong><font face="Arial"><FONT SIZE="4">er-bare1</font></FONT></strong></div></td>
			      <td align="center">&nbsp;</td>
			      <td align="right" class="bienvenido">&nbsp;
	     </td>
    </tr>
</table>
<div align="center"><img src="erbar000.gif" usemap="#er-bare1" ismap />
  <map name="er-bare1" >
    <area shape="RECT" coords="385,226,473,245" href="wimax001.php" />
    <area shape="RECT" coords="502,226,582,248" href="ridac000.php" />
    <area shape="RECT" coords="936,642,980,679" href="indic000.php" />
    <area shape="RECT" coords="670,582,799,664" href="energ003.php" />
 
    <area shape="RECT" coords="841,232,897,253" href="nodof002.php" />
    <area shape="RECT" coords="843,116,899,138" href="nodof001.php" />
    <area shape="RECT" coords="676,138,791,212" href="anill001.php" />
    <area shape="RECT" coords="503,128,560,150" href="nodof000.php" />
    <area shape="RECT" coords="338,363,370,404" href="plcco000.php" />
    <area shape="RECT" coords="56,170,134,215" href="ait.php" />
    <!--<area shape="rect" coords="300,560,375,633" <a href="file://///stotel02/ait/" target="_blank"> />-->
	 <area shape="rect" coords="300,560,375,633" href="#" onClick="entrar();" />
  </map>
</div>
<H5 align="center"><I><font face="Arial">Pagina Generada: Miercoles, 06 de Abril de 2011</font></I></H5>
<a id="OpenServerPath1" onclick="window.open('file://///stotel02/ait/');" >Click to Open Share Folderfgh</a>
</BODY>
</HTML>

Etiquetas: directorio
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:53.