🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1817

Re: OnChange VBScript v/s JavaScript

#1817
From: Lakrom
Date: Tue, 23 May 2006 06:13
78 lines
2865 bytes
Gracias ...
Voy a probar

"Lakrom" <lakrom@terra.cl> escribi� en el mensaje 
news:e4tl57$2ik$1@proxy.ifxnw.cl...
> Se�ores tengo el siguiente codigo VBScript:
>
> <%
> sub Carga()
> if request("cod") = "ADJ" Then
>  response.Write("<p><input type='text' name='textfield'></p>")
> else
> response.Write("<p>&nbsp;</p>")
> end if
> End Sub
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Untitled Document</title>
> </head>
> <body>
> <p><form name="Form10" action="prb2.asp">
>  <select name="select" onChange="location.href('prb2.asp?cod='+ 
> Form10.select.options[Form10.select.selectedIndex].value)">
>   <option value="000" selected>&nbsp;</option>
>    <option value="ADJ">Adjudicada</option>
>    <option value="PER">Perdida</option>
>  </select>
>  </form>
> </p>
> <%Carga()%>
> </body>
> </html>
>
> Funciona OK pero ahora o implemente solo con javascript y se me desaparece 
> el select.
> Algun experto de JavaScript que sepa como se hace.
>
> este es el codigo en java que no funciona.
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Documento sin t&iacute;tulo</title>
> </head>
>
> <body>
> <form name="form">
> <select name="combo1" onChange="Mostrar()">
>  <option value="000" selected>&nbsp;</option>
>  <option value="ADJ">Adjudicada</option>
>  <option value="PER">Perdidas</option>
>  <option value="REC">Rechazada</option>
> </select>
> </form>
> <script language="javascript">
> function Mostrar()
> {
> if (document.form.combo1.value=='ADJ')
> {
> return('<p><input type='text' name='textfield'></p>');
> }
> else
> {
> return('<p>&nbsp;</p>');
> }
> }
> </script>
> </body>
> </html>
>
>
> -- 
> Lakrom
> 
Technical Details
Message-ID: <e4u903$7a7$1@proxy.ifxnw.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news2.ifxnw.cl!not-for-mail
References: <e4tl57$2ik$1@proxy.ifxnw.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6e835526db0d50a7
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news2.ifxnw.cl!not-for-mail
From: "Lakrom" <lakrom@terra.cl>
Newsgroups: chile.comp.programacion
Subject: Re: OnChange VBScript v/s JavaScript
Date: Tue, 23 May 2006 02:13:55 -0400
Organization: IFX Networks News Server
Lines: 80
Message-ID: <e4u903$7a7$1@proxy.ifxnw.cl>
References: <e4tl57$2ik$1@proxy.ifxnw.cl>
NNTP-Posting-Host: 200.73.77.94
X-Trace: proxy.ifxnw.cl 1148364611 7495 200.73.77.94 (23 May 2006 06:10:11 GMT)
X-Complaints-To: abuse@ifxnetworks.com
NNTP-Posting-Date: Tue, 23 May 2006 06:10:11 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Response