Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You are an insult to my intelligence! I demand that you log off immediately.


devel / comp.lang.javascript / Get droplist index value by name?

SubjectAuthor
* Get droplist index value by name?Jonas Thörnvall
`* Re: Get droplist index value by name?Jonas Thörnvall
 `* Re: Get droplist index value by name?Jonas Thörnvall
  `- Re: Get droplist index value by name?Jonas Thörnvall

1
Get droplist index value by name?

<d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17362&group=comp.lang.javascript#17362

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5ac7:: with SMTP id d7mr11668793qtd.382.1634280073583;
Thu, 14 Oct 2021 23:41:13 -0700 (PDT)
X-Received: by 2002:a05:6830:348c:: with SMTP id c12mr6780945otu.206.1634280073338;
Thu, 14 Oct 2021 23:41:13 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 23:41:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com>
Subject: Get droplist index value by name?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 15 Oct 2021 06:41:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: Jonas Thörnvall - Fri, 15 Oct 2021 06:41 UTC

I have a dropdown "select option list" holding midi portIDs.
So reading the dropdown i know the name of available midiports.

I can visualy inspect to know the index of the ID i want.

But how can i use the ID to retrieve the index?
ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"

It is the the index of the Id of element out_portsel i am looking for?

Maybe i am doing it backward but i use the index to select output port.
In this case i know the "id" i want, but want is its index in the dropdownlist?

Re: Get droplist index value by name?

<d33cbe66-e870-45a0-aef2-7f17210312ffn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17363&group=comp.lang.javascript#17363

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:6bcc:: with SMTP id b12mr12025078qtt.101.1634280466286;
Thu, 14 Oct 2021 23:47:46 -0700 (PDT)
X-Received: by 2002:aca:d78b:: with SMTP id o133mr7313715oig.136.1634280466096;
Thu, 14 Oct 2021 23:47:46 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 23:47:45 -0700 (PDT)
In-Reply-To: <d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d33cbe66-e870-45a0-aef2-7f17210312ffn@googlegroups.com>
Subject: Re: Get droplist index value by name?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 15 Oct 2021 06:47:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 19
 by: Jonas Thörnvall - Fri, 15 Oct 2021 06:47 UTC

fredag 15 oktober 2021 kl. 08:41:19 UTC+2 skrev Jonas Thörnvall:
> I have a dropdown "select option list" holding midi portIDs.
> So reading the dropdown i know the name of available midiports.
>
> I can visualy inspect to know the index of the ID i want.
>
> But how can i use the ID to retrieve the index?
> ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
>
> It is the the index of the Id of element out_portsel i am looking for?
>
> Maybe i am doing it backward but i use the index to select output port.
> In this case i know the "id" i want, but want is its index in the dropdownlist?
I could probably loop through the id's equal to "x" and read out the index by loop counter.
But it seem a "A BIT IDIOTIC" if there already is a function for retrieving it.

Re: Get droplist index value by name?

<49d14e22-efca-4684-9cdf-316a6ec0b085n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17364&group=comp.lang.javascript#17364

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ae9:e887:: with SMTP id a129mr8746175qkg.81.1634280582376;
Thu, 14 Oct 2021 23:49:42 -0700 (PDT)
X-Received: by 2002:aca:604:: with SMTP id 4mr15902574oig.8.1634280582179;
Thu, 14 Oct 2021 23:49:42 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 23:49:41 -0700 (PDT)
In-Reply-To: <d33cbe66-e870-45a0-aef2-7f17210312ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com> <d33cbe66-e870-45a0-aef2-7f17210312ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <49d14e22-efca-4684-9cdf-316a6ec0b085n@googlegroups.com>
Subject: Re: Get droplist index value by name?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 15 Oct 2021 06:49:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 22
 by: Jonas Thörnvall - Fri, 15 Oct 2021 06:49 UTC

fredag 15 oktober 2021 kl. 08:47:50 UTC+2 skrev Jonas Thörnvall:
> fredag 15 oktober 2021 kl. 08:41:19 UTC+2 skrev Jonas Thörnvall:
> > I have a dropdown "select option list" holding midi portIDs.
> > So reading the dropdown i know the name of available midiports.
> >
> > I can visualy inspect to know the index of the ID i want.
> >
> > But how can i use the ID to retrieve the index?
> > ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
> >
> > It is the the index of the Id of element out_portsel i am looking for?
> >
> > Maybe i am doing it backward but i use the index to select output port.
> > In this case i know the "id" i want, but want is its index in the dropdownlist?
> I could probably loop through the id's equal to "x" and read out the index by loop counter.
> But it seem a "A BIT IDIOTIC" if there already is a function for retrieving it.
I give it 30 minutes "then i am going idiotic"

Re: Get droplist index value by name?

<3e9171b6-50c5-441c-b8b1-96b2783465f5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17366&group=comp.lang.javascript#17366

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:8201:: with SMTP id e1mr8773656qkd.224.1634282316601;
Fri, 15 Oct 2021 00:18:36 -0700 (PDT)
X-Received: by 2002:aca:5b56:: with SMTP id p83mr7765808oib.119.1634282316387;
Fri, 15 Oct 2021 00:18:36 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 15 Oct 2021 00:18:36 -0700 (PDT)
In-Reply-To: <49d14e22-efca-4684-9cdf-316a6ec0b085n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <d531c3e4-99ec-4c71-a5d8-ce0a28ade350n@googlegroups.com>
<d33cbe66-e870-45a0-aef2-7f17210312ffn@googlegroups.com> <49d14e22-efca-4684-9cdf-316a6ec0b085n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e9171b6-50c5-441c-b8b1-96b2783465f5n@googlegroups.com>
Subject: Re: Get droplist index value by name?
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Fri, 15 Oct 2021 07:18:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 33
 by: Jonas Thörnvall - Fri, 15 Oct 2021 07:18 UTC

fredag 15 oktober 2021 kl. 08:49:46 UTC+2 skrev Jonas Thörnvall:
> fredag 15 oktober 2021 kl. 08:47:50 UTC+2 skrev Jonas Thörnvall:
> > fredag 15 oktober 2021 kl. 08:41:19 UTC+2 skrev Jonas Thörnvall:
> > > I have a dropdown "select option list" holding midi portIDs.
> > > So reading the dropdown i know the name of available midiports.
> > >
> > > I can visualy inspect to know the index of the ID i want.
> > >
> > > But how can i use the ID to retrieve the index?
> > > ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
> > >
> > > It is the the index of the Id of element out_portsel i am looking for?
> > >
> > > Maybe i am doing it backward but i use the index to select output port.
> > > In this case i know the "id" i want, but want is its index in the dropdownlist?
> > I could probably loop through the id's equal to "x" and read out the index by loop counter.
> > But it seem a "A BIT IDIOTIC" if there already is a function for retrieving it.
> I give it 30 minutes "then i am going idiotic"
Ok this is how it ended up.

function getPortIndex(){
var e = parent.document.getElementById("out_portsel");
for (var i=0;i<parent.out_portsel.length;i++){
if (e.options[i].value=="FW1884 Control"){ctrlportindex=i; break;};
}
}


devel / comp.lang.javascript / Get droplist index value by name?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor