Jump to content

Input ve CheckBox Kontrolü


djonur007

Recommended Posts

Selamun aleykum;

ekranalntsja.png

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

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

olmadı :( Tam açıklıyayım.

ekranalntsja.png

Ş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

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...