djonur007 Posted October 6, 2010 Share Posted October 6, 2010 Selamun aleykum; Hocam şimdi sorum şu: resimdeki gibi ögeler var. Checkbox1 seçilince input1 aktif oluyor. sonra kişi butona basarsa(inputa hiç bişi yazmadan) hata mesajı vermesini istiyorum. Bu durum üç checkbox içinde geçerli. Ben şöyle bişi kodladım ama burada checkbox12i seçip input1'ede değer girince hata veriyor. Umarım anlatabilmişimdir. Şimdiden teşekkürler... Asecilimi = CheckBox.GetChecked("CheckBox1"); Bsecilimi = CheckBox.GetChecked("CheckBox2"); Csecilimi = CheckBox.GetChecked("CheckBox3"); if (Asecilimi or Bsecilimi or Csecilimi) then Ayol = Input.GetText("Input1"); Byol = Input.GetText("Input2"); Cyol = Input.GetText("Input3"); if (Ayol=="" or Byol=="" or Cyol=="") then Dialog.Message("HATA!", "Lütfen Bütün Alanları Doldurun...", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1); else Page.Navigate(PAGE_NEXT); end else Page.Navigate(PAGE_NEXT); end Link to comment Share on other sites More sharing options...
KintaRo Posted October 6, 2010 Share Posted October 6, 2010 Checkoxlari kontrol ettirmeye gerek yok. Zaten checkbox seçilmeden input aktif olmuyor diyorsun. Sadece inputları kontrol etsek yeter. şu şekilde: Ayol = Input.GetText("Input1"); Byol = Input.GetText("Input2"); Cyol = Input.GetText("Input3"); if (Ayol=="" or Byol=="" or Cyol=="") then Dialog.Message("HATA!", "Lütfen Bütün Alanları Doldurun...", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1); else Page.Navigate(PAGE_NEXT); end Link to comment Share on other sites More sharing options...
djonur007 Posted October 6, 2010 Author Share Posted October 6, 2010 olmadı Tam açıklıyayım. Şimdi butonlara elle değer giremiyoruz. Ek bir buton yardımı ile değer giriliyor. Örneğin: butona basınca Input.SetText("Input1", "asdasdasd"); komutunu uyguluyor. İşte bu durum her checkbox'ta var. Kullanıcı chechbox'ı seçer ek buton yardımı ile inputa değer girdirtmezse hata vermesini istiyorum... Az önce ek butonu yazmamımışım... Link to comment Share on other sites More sharing options...
spydevil Posted October 6, 2010 Share Posted October 6, 2010 bDevam = true; for a = 1, 3 do if CheckBox.GetChecked("CheckBox" .. a) == true and Input.GetText("Input" .. a) == "" then bDevam = false; end end if bDevam == false then Dialog.Message("", "Gerekli yerleri doldurunuz!!"); end Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.