Jump to content

evgenij

Neophyte
  • Posts

    1
  • Joined

  • Last visited

evgenij's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Повторно задаю свой вопрос, так как не дождался одобрения модератором своего первого поста. Итак вопрос. Есть джава-скрипт, результат работы которого правильно отображается только в Опере, и не отображается в других браузерах (проверялось в Хроме, Мозилле, IE). Как исправить скрипт так, чтобы его результат отображался во всех указанных браузерах? Вот код: var awardsProfile = { uid: false, init: function () { if (navigator.userAgent.indexOf('MSIE') == -1) { document.addEventListener('DOMContentLoaded', function () {awardsProfile.start();}, false); } else { this.start(); } }, start: function () { JsHttpRequest.query('jsloader.php?loader=awards', {action: 'medals', users: [this.uid], profile: 'yes'}, function (data, text) {awardsProfile.printMedals(data, text);}, false); }, printMedals: function (data, text) { var div = document.getElementById('awards'); var a, img; for (id in data.medals[this.uid]) { if (id = id.match(/\d+/)) { id = id[0]; a = document.createElement('a'); a.href = 'tools.php?action=awards&do=award&id=' + id; a.target = '_blank'; a.title = data.info[id][0]; img = document.createElement('img'); img.src = data.info[id][1]; a.appendChild(img); } else { a = document.createElement('a'); a.href = 'tools.php?action=awards&do=show&member=' + this.uid; a.target = '_blank'; a.innerHTML = data.medals[this.uid].a; } div.appendChild(a); } } }; awardsProfile.init();
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy