פורסם 2011 באפריל 1014 שנים שלום,אני מנסה לגרום לDIV להפוך להיות מוצג בזמן לחיצה על CHECKBOX.להלן הקוד:function moodleLunchApiIntergrate(String a, String b){document.getElementById(a).style.visibility = document.getElementById(b).checked ? 'visible' : 'hidden'; } </script> <input type="checkbox" id ="1" onclick="moodleLunchApiIntergrate('2','1')"/> <div id="2" style="visibility:hidden"> <iframe src = "[url]http://www.walla.co.il">[/url] </iframe> <>הDIV לא מוצג. יש למישהו רעיון?תודה!
פורסם 2011 באפריל 1114 שנים תחליף את השורהfunction moodleLunchApiIntergrate(String a, String b)בfunction moodleLunchApiIntergrate(a, b)וסתם טיפה יותר יעיל ונוח:<script type="text/javascript"> function moodleLunchApiIntergrate(sdr, el) { document.getElementById(el).style.visibility = sdr.checked ? 'visible' : 'hidden'; } </script> <input type="checkbox" onclick="moodleLunchApiIntergrate(this,'2')" /> <div id="2" style="visibility:hidden"> <iframe src = "[url]http://www.walla.co.il">[/url] </iframe> </div>
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.