🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39369

Re: Podwójne menu

#39369
From: Mateusz Dabrowski
Date: Sat, 17 Jun 2006 06:04
143 lines
4657 bytes
"Robert" <raku4@WYTNIJ-TO.vp.pl> wrote in message 
news:e1e4ro$gn$1@atlantis.news.tpi.pl...
> Witam
>
> Mam podwójne menu Kategoria i PodKategoria. Po wybraniu kategorii i 
> podkategori i kliknięciu w button ma otworzyć się ta sama strona ale z 
> wybranymi wcześniej kategorią i podkategorią . Z tym pierwszym jakoś sobie 
> poradzę w php ale z podkategorią nie mogę nic wymyślić
>
>
>
> Oto plik 8.php
>
>
>
> <?
>
> $katzaznacz[$czesci_kat]="selected";
>
> $podkatzaznacz[$czesci_podkat]="selected";
>
> $markazaznacz[$marka]="selected";
>
> echo'
>
> <form name=dodaj action="8.php" method="post" >
>
> <b>Kategoria:</b>
>
>                         <select name="czesci_kat" 
> onChange="czescidredirect(this.options.selectedIndex)"><option 
> value="0">--  wybierz --</option>
>
>                                    <option  value="1" '.$katzaznacz[1].'
> >audio</option><option  value="2" '.$katzaznacz[2].' >cały na
> czę&#182;ci</option><option  value="3" '.$katzaznacz[3].' >elementy 
> wnętrza</option><option  value="4" '.$katzaznacz[4].' >elementy 
> zewnętrzne</option>
>
>                                    </select>
>
>
>
>                            ';          ?>
>
> <br><br>
>
> <b>PodKategoria:</b>
>
>                                    <select name="czesci_podkat">
>
>                  <option value="0">-- wybierz --</option>
>
>                  </select>
>
>
>
>            <script type="text/javascript">
>
>            <!--
>
>            var czescigroups = document.dodaj.czesci_kat.options.length
>
>            var czescigroup = new Array(czescigroups)
>
>            for ( i = 0 ; i < czescigroups ; i++ )
>
>                czescigroup[i] = new Array()
>
>                      czescigroup[1][0] = new Option("-- wybierz --","0");
>
>                      czescigroup[1][1] = new Option("głosnik","1");
>
>                       czescigroup[1][2] = new Option("odtwarzacz CD","2");
>
>                       czescigroup[2][0] = new Option("-- wybierz --","0");
>
>                       czescigroup[2][1] = new Option("cały na 
> częsci","6");
>
>                       czescigroup[3][0] = new Option("-- wybierz --","0");
>
>                       czescigroup[3][1] = new Option("deska 
> rozdzielcza","7");
>
>                       czescigroup[3][2] = new Option("dywaniki 
> gumowe","8");
>
>                       czescigroup[4][0] = new Option("-- wybierz --","0");
>
>                       czescigroup[4][1] = new Option("aeropakiet","35");
>
>                       czescigroup[4][2] = new Option("antena","36");
>
>
>
>            var czescitemp=document.dodaj.czesci_podkat
>
>
>
>            function czescidredirect(x)
>
>            {
>
>                for ( m = czescitemp.options.length - 1 ; m > 0 ; m-- )
>
>                    czescitemp.options[m] = null
>
>
>
>                for ( i = 0 ; i < czescigroup[x].length ; i++ )
>
>                {
>
>                    czescitemp.options[i] = new 
> Option(czescigroup[x][i].text,czescigroup[x][i].value)
>
>
>
>                        if ( czescitemp.options[i].value == 0 )
>
>                            czescitemp.options[i].selected = true
>
>                }
>
>            }
>
>
>
> 
> czescidredirect(document.dodaj.czesci_kat.options.selectedIndex);
>
>            //-->
>
>            </script>
>
> <input type="submit" name="dalej" value="dalej">
>
> </form>
>
>
> 
Technical Details
Message-ID: <e7065d$t3d$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <e1e4ro$gn$1@atlantis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "Mateusz Dabrowski" <w21588@poczta.wsiz.rzeszow.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Podwójne menu
Date: Sat, 17 Jun 2006 08:04:15 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 145
Message-ID: <e7065d$t3d$1@nemesis.news.tpi.pl>
References: <e1e4ro$gn$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: dxs170.internetdsl.tpnet.pl
X-Trace: nemesis.news.tpi.pl 1150524397 29805 83.14.44.170 (17 Jun 2006 06:06:37 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Sat, 17 Jun 2006 06:06:37 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-Antivirus: avast! (VPS 0624-2, 2006-06-15), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit