🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #374

Re: Páginas jsp y javascript.

#374
From: Manuel
Date: Tue, 22 May 2007 10:31
94 lines
4603 bytes
Bien, dada tu incapacidad para reproducir el error, a pesar de que en
un mail anterior está el código fuente de la página y que el fichero
javascript solo incluye una función simple, te pego a continuación el
código fuente de la página y el javascript.

index.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="es">
<head>
   <title>Procesamiento de imagenes</title>
   <link media="all" type="text/css" href="/SnakeSystemWeb/css/
styles.css" rel="StyleSheet" />
   <meta content="text/html; charset=iso-8859-1" http-equiv="Content-
Type" />
</head>
<body>
   <div id="window">
      <div id="header">
         <span>Snake System Web</span>
      </div>
      <div class="pageBody">
         <div id="content">
            <script type="text/javascript" src="./js/functions.js"/>
            101603200<br />
            377<br />
            [{internalEnergy=0.0, y=97, x=126}, {internalEnergy=0.0,
y=140, x=126}, {internalEnergy=0.0, y=116, x=141},
{internalEnergy=0.0, y=115, x=103}]<br />
            0.0<br />

            <div class="infoPanel">
               ( 126 , 97 ) ( 126 , 140 ) ( 141 , 116 ) ( 103 , 115 )
               <br />
               <br />
               126 97 126 140 141 116 103 115
            </div>

            <script type="text/javascript">
               sayHi();
            </script></div>
         </div>
         <div id="footer">
            Software desarrollado por mi.
         </div>
   </div>
</body>
</html>

./js/functions.js:

function sayHi()
{
   alert("hola");
}

Como podrás observar, el contenido del div con id igual "content" no
se muestra. Ese es el fallo. En cambio, si eliminamos la linea que
inserta el fichero externo de javascript y sustituimos la llamada a la
funcion sayHi() por alert("hola"), si se ejecuta correctamente la web
incluyendo el popup que salta antes de acabar de cargar la web.

Espero que esto te sirva para reproducir el error.

Muchas gracias por tu colaboración.
Un saludo.
Manuel.

PD: Aunque no venga Raphael ni ningún otro medium, espero que si venga
un poquito de humildad y buen rollo.

Oscar Garcia wrote:
> Oscar Garcia escribió:
> > Viendo que no soy capaz de reproducir tu error debido a la escasa
> > cooperación por tu parte me retiro de la ayuda (hasta nueva noticia).
>
> Bueno, realmente sí he logrado reproducir su problema, pero es tan
> trivial y tan chorra que ni la he puesto:
>
> <script type="text/javascript">
> function alert () {
> }
> </script>
>
> <script type="text/javascript">
> alert ("bienvenido a la web más chula de todas");
> </script>
>
> Saludos.
>
> --
> Óscar Javier García Baudet
> LinaresDigital
Technical Details
Message-ID: <1179829908.533305.14470@b40g2000prd.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!postnews.google.com!b40g2000prd.googlegroups.com!not-for-mail
References: <1178203794.010140.148230@c35g2000hsg.googlegroups.com> <f1tejb$omf$1@huron.algomas.org> <1178781229.974412.200140@q75g2000hsh.googlegroups.com> <f2kmsl$v7s$1@huron.algomas.org> <1179732710.037373.107450@y18g2000prd.googlegroups.com> <f2ritu$2u6$1@cormoran.emeteo.local> <1179775582.458476.240230@z24g2000prd.googlegroups.com> <1179782255.775791.67170@y18g2000prd.googlegroups.com> <f2u83b$ssi$1@cormoran.emeteo.local> <f2u88c$ssi$2@cormoran.emeteo.local>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,5f1ade08b7d61562
X-Google-Attributes: gid1116f3,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!postnews.google.com!b40g2000prd.googlegroups.com!not-for-mail
From: Manuel <mfc1981@gmail.com>
Newsgroups: es.comp.lenguajes.java
Subject: Re: Páginas jsp y javascript.
Date: 22 May 2007 03:31:48 -0700
Organization: http://groups.google.com
Lines: 95
Message-ID: <1179829908.533305.14470@b40g2000prd.googlegroups.com>
References: <1178203794.010140.148230@c35g2000hsg.googlegroups.com>
   <f1tejb$omf$1@huron.algomas.org>
   <1178781229.974412.200140@q75g2000hsh.googlegroups.com>
   <f2kmsl$v7s$1@huron.algomas.org>
   <1179732710.037373.107450@y18g2000prd.googlegroups.com>
   <f2ritu$2u6$1@cormoran.emeteo.local>
   <1179775582.458476.240230@z24g2000prd.googlegroups.com>
   <1179782255.775791.67170@y18g2000prd.googlegroups.com>
   <f2u83b$ssi$1@cormoran.emeteo.local>
   <f2u88c$ssi$2@cormoran.emeteo.local>
NNTP-Posting-Host: 212.163.35.44
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1179829918 7321 127.0.0.1 (22 May 2007 10:31:58 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 22 May 2007 10:31:58 +0000 (UTC)
In-Reply-To: <f2u88c$ssi$2@cormoran.emeteo.local>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 XISASVR2
Complaints-To: groups-abuse@google.com
Injection-Info: b40g2000prd.googlegroups.com; posting-host=212.163.35.44;
   posting-account=H-YqNA0AAAAaCJhGy7zX3S71sySTjbQZ