PHP - No reconoce el "href"

 
Vista:

No reconoce el "href"

Publicado por DEVILSITO (1 intervención) el 16/03/2014 04:05:48
En el siguiente codigo, una linea esta inhibida y es precisamente la que funciona correctamente, Sin embargo inmediatamente mas abajo está la linea que debiera hacer lo mismo pero da un error. Se diferencia a la anterior en que esta ultima hace un llamado a una funcion JS (que está al comienzo del HTML)
El error, al ejecutar este código es que deriva a una nueva pagina HTML mostrando los datos que se requieren y no en la ventana reducida (HTML) que es donde debieran aparecer dichos datos. Solamente muestra al frente la ventana chica con la leyenda: "objeto no localizado". el código completo es el siguiente:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
<head>
 <title>Ejemplo de 'todo.html' usando Popup y JavaScript </title>
</head>
<script type="text/javascript">
   function poponload() {
     testwindow = window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500');
     testwindow.moveTo(40, 100);
    }
</script>
 
<body>
<h1>Ejemplo de 'todo.html' usando Popup y JavaScript</h1>
 
	<!--
	<a href='inmueble2.php?empresa=1&proyecto=4327&nombre_c=Los 3 Chanchitos&numsol_n=1143' 
	target='popup' onClick="window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500')" >Prueba Ventana</a> 
	-->
 
	<a href='inmueble2.php?empresa=1&proyecto=4327&nombre_c=Los 3 Chanchitos&numsol_n=1143'
	target='popup' onclick="return poponload()">Prueba Ventana</a>
 
 
</body>
 
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

No reconoce el "href"

Publicado por xve (6935 intervenciones) el 16/03/2014 18:04:03
Hola Devilsito, creo que tienes que pasar el objeto this... si no lo pasas, no sabra que pagina abrir...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
<head>
 <title>Ejemplo de 'todo.html' usando Popup y JavaScript </title>
</head>
<script type="text/javascript">
    function poponload(this) {
        testwindow = window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500');
        testwindow.moveTo(40, 100);
        return false;
    }
</script>
 
<body>
<h1>Ejemplo de 'todo.html' usando Popup y JavaScript</h1>
 
    <!--
    <a href='inmueble2.php?empresa=1&proyecto=4327&nombre_c=Los 3 Chanchitos&numsol_n=1143' 
    target='popup' onClick="window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500')" >Prueba Ventana 1</a> 
    -->
 
    <a href='inmueble2.php?empresa=1&proyecto=4327&nombre_c=Los 3 Chanchitos&numsol_n=1143'
    target='popup' onclick="return poponload(this)">Prueba Ventana 2</a>
 
</body>
 
</html>

Coméntanos, ok?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

He simplificado el còdigo pero sigue igual

Publicado por DEVILSITO (140 intervenciones) el 16/03/2014 23:52:24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
 <title>Ejemplo de 'todo.html' usando Popup y JavaScript </title>
</head>
<script type="text/javascript">
   function poponload(this) {
     testwindow = window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500');
     testwindow.moveTo(40, 100);
    }
</script>
 
<body>
<h1>Ejemplo de 'todo.html' usando Popup y JavaScript</h1>
 
	<!--
	<a href='inmueble2.php?empresa=1&proyecto=4327&nombre_c=Los 3 Chanchitos&numsol_n=1143' 
	target='popup' onClick="window.open(this.href, this.target,'location=1,status=1,scrollbars=1,width=500,height=500')" >Prueba Ventana</a> 
	-->
 
	<a href="http://yahoo.com" target='popup' onclick="return poponload(this)">Prueba Ventana</a>
 
 
</body>
 
</html>

Si me preguntas,...el JS esta activado en el FireFox, pues esta realizando otras funciones de validacion.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar