IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

 Kayıt ol  Topluluk
Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 10 Ekim 2014, 04:02   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Birbirine Bağlı Olarak Değişen Combobox'lar




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
<BODY
<!-- 
OriginalMikayel Muradyan (mikam[MENTION=4110]freenet[/MENTION].am) --> 

<
SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
<!-- 

// Initialize class for Type and Style 

function Type(idtype){ 

this.id id

this.type type



function 
Style(idid_typestyle){ 

this.id id

this.id_type id_type

this.style style



// Initialize Array's Data for Type and Style 

TypeArray = new Array( 

new 
Type(1"Apparel"), 

new 
Type(2"Shoes"), 

new 
Type(5"Accessories"

); 



StyleArray = new Array( 

new 
Style(41"Apparel_1"), 

new 
Style(71"Apparel_2"), 

new 
Style(412"Shoes_3"), 

new 
Style(212"Shoes_4"), 

new 
Style(172"Shoes_2"), 

new 
Style(305"Accessories_3"), 

new 
Style(275"Accessories_4"), 

new 
Style(315"Accessories_3"

); 


function 
init(sel_typesel_style){ 

document.product.id_type.options[0] = new Option("[ Type ]"); 

document.product.id_style.options[0] = new Option("[ Style ]"); 

for(
1<= TypeArray.lengthi++){ 

document.product.id_type.options[i] = new Option(TypeArray[i-1].typeTypeArray[i-1].id); 

if(
TypeArray[i-1].id == sel_type

document.product.id_type.options[i].selected true



OnChange(sel_style); 





function 
OnChange(sel_style){ 

sel_type_index document.product.id_type.selectedIndex

sel_type_value parseInt(document.product.id_type[sel_type_index].value); 


for(
document.product.id_style.length 10i--) 

document.product.id_style.options[i] = null


j=1

for(
1<= StyleArray.lengthi++){ 

if(
StyleArray[i-1].id_type == sel_type_value){ 

document.product.id_style.options[j] = new Option(StyleArray[i-1].styleStyleArray[i-1].id); 

if(
StyleArray[i-1].id == sel_style
document.product.id_style.options[j].selected true

j++; 







//--> 

</SCRIPT> 

<form name="product"> 

<select name="id_type" size="1" style="width: 150px;" onChange="OnChange()"></select> 

<select name="id_style" size="1" style="width: 150px;"></select> 

</form> 

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> 

<!-- 

//init(5, 31); // Initialize comboboxes by selected sel_type and sel_style 

init(); // Default initialize comboboxes for Type and Style 

//--> 

</SCRIPT> 


__________________
Bu kez pek bir afili yalnızlık, ağlatan bir kadın kadar düşman. Ağzı bozuk üstelik bırakmıyor acıtmadan.
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet
Cevapla

Etiketler
bağlı, birbirine, comboboxlar, değişen, olarak


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Kur’ân-ı Kerim'in Sebebe Bağlı Olarak ve Olmayarak Nüzûlü Ecrin Genel İslami Konular 0 06 Mayıs 2011 22:54
C# Object Listbox-Combobox Sunay C# 0 24 Nisan 2010 01:53
Çatıda Eli Kolu Bağlı Olarak Bulundu Kralice Haber Arşivi 0 16 Haziran 2008 10:17