🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Ayuda

#28709
From: El Condor
Date: Fri, 20 Mar 1998 00:00
169 lines
6805 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_00C6_01BD544A.28FCA140
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hola a todos tengo un problemilla que no se como solucionar y es que =
estoy justo empezando a aprender y soy un poco tocho.
El caso es que estoy creando una pagina con frames y en uno de ellos (el =
del menu) quiero poner una lista desplegable de links, de manera que al =
escoger uno y pulsar un boton vaya al lugar escogido.
Bueno, pues metiendo las narices en las paginas de los que saben y luego =
toquiteando un poco por aqui y por alli he conseguido que me funcione, =
pero, y ahi tengo el problema, lo que me hace es abrir otra ventana del =
navegador ya que la opcion que conozco es window.open y yo lo que =
quisiera es que me fuera a la pagina target.
Alguien me puede ayudar?
Adjunto la pagina para que veais mis fallos.
Gracias      =20

<script language=3D"JavaScript">
<!--
function srchnow(fm)
  {
  var http;
  var sterms=3D"";
  var j=3D0;
  var l;
  var engvar;
  for (j=3D0;j<l;j++)
    {
    if (tmp.charAt(j)=3D=3D" ")
      {
      sterms+=3D"+";
      }
    else
      {
      sterms+=3Dtmp.charAt(j);
      }
    }
  l=3Dfm.engine.options.length;
  for (j=3D0;j<l;j++)
    {
    if (fm.engine.options[j].selected=3D=3Dtrue)
      {
      engvar=3Dfm.engine.options[j].text;
      }
    }

  if (engvar=3D=3D"Fotos 97")
    http=3D"fotos97.html";
  if (engvar=3D=3D"Fotos 98")
    http=3D"fotos98.html";
  =
window.open(http,"Results","toolbar=3Dyes,location=3Dyes,directories=3Dno=
,status=3Dyes,menubar=3Dyes,scrollbars=3Dyes,resizable=3Dyes,copyhistory=3D=
yes,width=3D600,height=3D500");
  return;
  }
// -->
</script>


<FONT SIZE=3D"3"><U><FONT COLOR=3D"Navy"><CENTER>FOTOS</CENTER></FONT>
<form target=3D"_blank">
  <blockquote>
  <select name=3D"engine" size=3D"1">
      <option value=3D"Fotos 97">Fotos 97</option>
      <option value=3D"Fotos 98">Fotos 98</option>
    </select>
 <input type=3D"button" value=3D"Buscar" =
onclick=3D"srchnow(this.form)"></p>
  </blockquote>
</form>



------=_NextPart_000_00C6_01BD544A.28FCA140
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT color=3D#000000 size=3D2>Hola a todos tengo un problemilla =
que no se como=20
solucionar y es que estoy justo empezando a aprender y soy un poco=20
tocho.</FONT></DIV>
<DIV><FONT size=3D2>El caso es que estoy creando una pagina con frames y =
en uno de=20
ellos (el del menu) quiero poner una lista desplegable de links, de =
manera que=20
al escoger uno y pulsar un boton vaya al lugar escogido.</FONT></DIV>
<DIV><FONT size=3D2>Bueno, pues metiendo las narices en las paginas de =
los que=20
saben y luego toquiteando un poco por aqui y por alli he conseguido que =
me=20
funcione, pero, y ahi tengo el problema, lo que me hace es abrir otra =
ventana=20
del navegador ya que la opcion que conozco es window.open y yo lo que =
quisiera=20
es que me fuera a la pagina target.</FONT></DIV>
<DIV><FONT size=3D2>Alguien me puede ayudar?</FONT></DIV>
<DIV><FONT size=3D2>Adjunto la pagina para que veais mis =
fallos.</FONT></DIV>
<DIV><FONT =
size=3D2>Gracias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><BR>&lt;script=20
language=3D&quot;JavaScript&quot;&gt;<BR>&lt;!--<BR>function =
srchnow(fm)<BR>&nbsp;=20
{<BR>&nbsp; var http;<BR>&nbsp; var sterms=3D&quot;&quot;;<BR>&nbsp; var =

j=3D0;<BR>&nbsp; var l;<BR>&nbsp; var engvar;<BR>&nbsp; for=20
(j=3D0;j&lt;l;j++)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if=20
(tmp.charAt(j)=3D=3D&quot; &quot;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
sterms+=3D&quot;+&quot;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}<BR>&nbsp;&nbsp;&nbsp;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
sterms+=3Dtmp.charAt(j);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}<BR>&nbsp;&nbsp;&nbsp;=20
}<BR>&nbsp; l=3Dfm.engine.options.length;<BR>&nbsp; for=20
(j=3D0;j&lt;l;j++)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if=20
(fm.engine.options[j].selected=3D=3Dtrue)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
engvar=3Dfm.engine.options[j].text;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp; if (engvar=3D=3D&quot;Fotos=20
97&quot;)<BR>&nbsp;&nbsp;&nbsp; =
http=3D&quot;fotos97.html&quot;;<BR>&nbsp; if=20
(engvar=3D=3D&quot;Fotos 98&quot;)<BR>&nbsp;&nbsp;&nbsp;=20
http=3D&quot;fotos98.html&quot;;<BR>&nbsp;=20
window.open(http,&quot;Results&quot;,&quot;toolbar=3Dyes,location=3Dyes,d=
irectories=3Dno,status=3Dyes,menubar=3Dyes,scrollbars=3Dyes,resizable=3Dy=
es,copyhistory=3Dyes,width=3D600,height=3D500&quot;);<BR>&nbsp;=20
return;<BR>&nbsp; }<BR>// --&gt;<BR>&lt;/script&gt;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2><BR>&lt;FONT=20
SIZE=3D&quot;3&quot;&gt;&lt;U&gt;&lt;FONT=20
COLOR=3D&quot;Navy&quot;&gt;&lt;CENTER&gt;FOTOS&lt;/CENTER&gt;&lt;/FONT&g=
t;<BR>&lt;form=20
target=3D&quot;_blank&quot;&gt;<BR>&nbsp; &lt;blockquote&gt;<BR>&nbsp; =
&lt;select=20
name=3D&quot;engine&quot; =
size=3D&quot;1&quot;&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;option value=3D&quot;Fotos 97&quot;&gt;Fotos=20
97&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option =
value=3D&quot;Fotos=20
98&quot;&gt;Fotos 98&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;/select&gt;<BR>&nbsp;&lt;input type=3D&quot;button&quot;=20
value=3D&quot;Buscar&quot;=20
onclick=3D&quot;srchnow(this.form)&quot;&gt;&lt;/p&gt;<BR>&nbsp;=20
&lt;/blockquote&gt;<BR>&lt;/form&gt;<BR></FONT></DIV>
<DIV>&nbsp;</DIV></DIV></BODY></HTML>

------=_NextPart_000_00C6_01BD544A.28FCA140--
Technical Details
Message-ID: <6eukcf$mm1$1@talia.mad.ibernet.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit
X-Google-Thread: 1116f3,336ca61784b54762,start
X-Google-Attributes: gid1116f3,public
From: "El Condor" <el.condor@mx2.redestb.es>
Subject: Ayuda
Date: 1998/03/20
Message-ID: <6eukcf$mm1$1@talia.mad.ibernet.es>
X-Deja-AN: 336155976
Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C6_01BD544A.28FCA140"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
Newsgroups: es.comp.lenguajes.java