Question

I'm using a simple chained select jacasvript on my webpage. It's working in Chrome, Firefox, Internet Explorer and others, but in Opera not really. Opera disable the second select, but I don't know why and how.

This is it: http://enairgy.hu/tanfolyamok/online-jelentkezem.html?kategoria=9&datum=160

    <script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="http://www.appelsiini.net/download/jquery.chained.js" type="text/javascript" charset="utf-8"></script>
    <script src="http://www.appelsiini.net/download/jquery.chained.remote.js" type="text/javascript" charset="utf-8"></script>

    <select id="kategoria" name="kategoria" style="font-size:14px;">
    <option value="">Válassz kategóriát</option>
    <option value="1" >Közép haladó tanfolyam</option><option value="3" >7 napos Intenziv</option><option value="4" >Akciós Tandemrepülés</option><option value="9"  selected >Utazások</option><option value="11" >3 napos intenzív</option></select>

<select id="datum"  name="datum" style="font-size:12px;">
<option value="">Válassz dátumot</option>

<option value="22" class="5" onclick="this.form.submit();return true;"   style=" background-color: #00FF00; color: black;" >Aug 20.Haladó Tanfolyam (Még van hely.)</option>

<option value="23" class="5" onclick="this.form.submit();return true;"   style=" background-color: #00FF00; color: black;" >Szeptember 15 (Még van hely.)</option>
    ...
    </select>

But why the second is disabled in opera? How can I reenable it?

Was it helpful?

Solution

Reason of bug is in line 52 of jquery.chained.js:

$(self).removeAttr("disabled");

Removing native attributes isn't correct. Use $(self).prop("disabled", false) instead of this line, or use newer version of jQuery(at least 1.7.2), where is a workaround for this problem (see jQuery ticket).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top