Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] WHY would a drop down box redirection scirpt


  • From: javascript@xxxxxxxxxx (Scott.Wiseman)
  • Subject: [Javascript] WHY would a drop down box redirection scirpt
  • Date: Wed, 26 Sep 2001 10:25:55 -0700

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C146B0.4CBCAC4A
Content-Type: text/plain;
	charset="iso-8859-1"

thanks for your vcard 

but can anyone answer me why

-----Original Message-----
From: staeger [mailto:staeger@xxxxxxxxxxxx]
Sent: Tuesday, September 25, 2001 11:42 PM
To: javascript@xxxxxxxxxx
Subject: Re: [Javascript] WHY would a drop down box redirection scirpt




"Scott.Wiseman" wrote:

>
>
> work on one machine in the same browser
> and not work on another
>
> one machine has windows 2k
> the other windows nt.
>
> i.e.
>
> code
>
> <head>
> <title>Admin Main Menu</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> function reDirect(thevar)
>  {
>       window.location.href = thevar.value;
> }
> // -->
> </SCRIPT>

shouldn't it be :

function reDirect(thevar)
 {
      window.location.href = thevar.options[thevar.selectedIndex].value;

}

greets  ben./

------_=_NextPart_001_01C146B0.4CBCAC4A
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>RE: [Javascript] WHY  would a drop down box redirection scirpt</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>thanks for your vcard </FONT>
</P>

<P><FONT SIZE=2>but can anyone answer me why</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: staeger [<A HREF="mailto:staeger@xxxxxxxxxxxx";>mailto:staeger@xxxxxxxxxxxx</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, September 25, 2001 11:42 PM</FONT>
<BR><FONT SIZE=2>To: javascript@xxxxxxxxxx</FONT>
<BR><FONT SIZE=2>Subject: Re: [Javascript] WHY would a drop down box redirection scirpt</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>&quot;Scott.Wiseman&quot; wrote:</FONT>
</P>

<P><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; work on one machine in the same browser</FONT>
<BR><FONT SIZE=2>&gt; and not work on another</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; one machine has windows 2k</FONT>
<BR><FONT SIZE=2>&gt; the other windows nt.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; i.e.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; code</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;head&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;title&gt;Admin Main Menu&lt;/title&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;</FONT>
<BR><FONT SIZE=2>&gt; charset=iso-8859-1&quot;&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;!--</FONT>
<BR><FONT SIZE=2>&gt; function reDirect(thevar)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; {</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; window.location.href = thevar.value;</FONT>
<BR><FONT SIZE=2>&gt; }</FONT>
<BR><FONT SIZE=2>&gt; // --&gt;</FONT>
<BR><FONT SIZE=2>&gt; &lt;/SCRIPT&gt;</FONT>
</P>

<P><FONT SIZE=2>shouldn't it be :</FONT>
</P>

<P><FONT SIZE=2>function reDirect(thevar)</FONT>
<BR><FONT SIZE=2>&nbsp;{</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; window.location.href = thevar.options[thevar.selectedIndex].value;</FONT>
</P>

<P><FONT SIZE=2>}</FONT>
</P>

<P><FONT SIZE=2>greets&nbsp; ben./</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C146B0.4CBCAC4A--