Jump to content
php.lv forumi

Drop-Down box + JS + PHP


Raiviic

Recommended Posts

ir txt fails ar 5 nosaukumiem:

 

1

2

3

4

5

 

ir JS risinajums:

 

<script LANGUAGE="JavaScript">

<!--

 

function gotos(ind)

{

if (ind==1) { window.location="adrese"; }

 

if (ind==2) { window.location="adrese"; }

 

if (ind==3) { window.location="adrese"; }

 

if (ind==4) { window.location="adrese"; }

 

if (ind==5) { window.location="adrese"; }

 

}

 

//-->

</SCRIPT>

 

un pats drop-down html koda:

 

<SELECT NAME="aaa" onchange="gotos(aaa.selectedIndex);" style="border-style: dotted; border-width: 1; background-color: #C0C0C0>

<OPTION>1</OPTION>

<OPTION>2</OPTION>

<OPTION>3</OPTION>

<OPTION>4</OPTION>

<OPTION>5</OPTION>

</SELECT>

 

vajadzetu kkadu smuku risinajumu lai no txt faila iedabutu attiecigo listi kura paraditos drop-down sarakstaa nevis shadi kad jaraksta ar roku - ta liste ir dinamiski mainiga

Link to comment
Share on other sites

×
×
  • Create New...