Forum

html select option ...
 
Bildirimler
Hepsini Temizle

html select option chrome ve firefox sorunum

4 Yazılar
2 Üyeler
0 Likes
500 Görüntüleme
(@EnesHarun)
Gönderiler: 37
Trusted Member
Konu başlatıcı
 

Merhaba arkadaşlar, 

Chrome'da doğru çalışan aşağıdaki kodum Firefox'da çalışmıyor. Kodda şu yapılıyor: 1.dropdown'da ders seçiliyor ve seçilen derse ait üniteler 2.dropdownda gözüküyor. bu chromeda çalışıyor fakat firefoxda çalışmıyor. Yardımlarınızı bekliyorum.

 

<form id="Frm" name="Frm" method="post" action="test_ekleislem.asp">
 <div style="border:none;margin-top:10px">
  <ul>
    <li align="center" style="font-size:25px"><h1><b>Test Ekle</b></h1></li>
  </ul>
  <ul>
    <li align="center">
     <%
         response.write(request.cookies("hatali"))
         Response.Cookies("hatali").Expires = Now() - 1
     %>
     </li>
  </ul>
  <ul>
     <li align="left" style="padding-top:10px">
         <%
            sql="select * from SDERS order by DERS ASC"
            set sorgu=Baglanti.execute(sql)
            sql2="select count(*) as sayi from SDERS"
           set sorgu2=Baglanti.execute(sql2)
         %>
        <select name="isim" id="isim" style="width:240px;height:25px; font-size:16px;color: gray;" onchange="this.form.action='';             javascript:this.form.submit()">
            <option value="0">Ders Seç</option>
               <%
                  do while not i=cint(sorgu2.fields("sayi"))
               %>
            <option value="<%response.Write sorgu("ID")%>"><%response.Write sorgu("DERS")%></option>
               <%
                  i=i+1
                  sorgu.movenext
                  loop
               %>
        </select>
        <script>
            //Get select object
             var objSelect = document.getElementById("isim");
            //Set selected
             setSelectedValue(objSelect, "<%=MenuId%>"); // gelen index değeri 10
             function setSelectedValue(selectObj, valueToSet) {
               for (var i = 0; i < selectObj.options.length; i++) {
                  if (selectObj.options[i].value== valueToSet) { // value suna göre seçer
                    selectObj.options[i].selected = true;
                    return;
                  }
                }
             }
        </script>
      </li>
  </ul>
  <ul>
       <li align="left" style="padding-top:10px">
           <%
               MenuId=request.Form("isim")
               if MenuId<>"0" then
                 sql1="select * from SUNITE where DERS='"&MenuId&"'"
                 set sorgu1=Baglanti.execute(sql1)
                 sql2="select COUNT(*) as sayi from SUNITE where DERS='"&MenuId&"'"
                 set sorgu2=Baglanti.execute(sql2)
           
               end if
           %>
           <select name="ders" id="ders" style="width:240px;height:25px; font-size:16px;color: gray;">
               <option value="0">Ünite Seç</option>
                   <%
                       if sorgu1.eof and sorgu1.bof then
 
                       else
                           do while not j=cint(sorgu2.fields("sayi"))
                   %>
               <option value="<%=sorgu1("ID")%>"><%=sorgu1("UNITE")%></option>
                   <%
                            j=j+1
                           sorgu1.movenext
                           loop
                        end if
                    %>
            </select>
        </li>
  </ul>
  <ul>
        <li align="left" style="padding-top:15px"><input name="test" type="text" id="txtName" size="25" style="height:25px; font-size:16px;color:        gray; width:240px " value="Test Adı" onblur="if(this.value=='') this.value='Test Adı';" onfocus="if(this.value=='Test Adı') this.value='';"></li>
  </ul>
  <ul>
        <li align="left" style="padding-top:10px">
            <input type="submit" name="mYSubmit" value="Kaydet" style="width:120px;height:30px;">
            <input type="reset" name="Submit2" value="Formu temizle" style="width:120px;height:30px;">
        </li> 
  </ul>
</div>
</form>

 
Gönderildi : 23/11/2015 13:02

(@eravse)
Gönderiler: 1753
Üye
 

merhaba JQuery Change kullanmayı denediniz mi ?

 

$( ".target" ).change(function() {
alert( "Handler for .change() called." );

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 23/11/2015 17:56

(@EnesHarun)
Gönderiler: 37
Trusted Member
Konu başlatıcı
 

verdiğiniz kodu denemedim hiç ama sorunu buldum. Menu sayfamda bir link yüzünden kaynaklanıyormuş ne ilginç bir durum.

 

İlgine teşekkürler.

 
Gönderildi : 23/11/2015 18:25

(@eravse)
Gönderiler: 1753
Üye
 

rica ne demek

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 23/11/2015 20:13

Paylaş: