•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,813 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,487 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2071 | Replies: 8
•
•
Join Date: Dec 2006
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
Hi,
I got very very strange problem. Since 19 of december, when all FireFox in company was upgrated automaticaly, code below stopped working. Strange thing is, when i wanted to solve it, it started to work when i've putted alert() function. Here you have working and not working examples. I'll add that this function is used about 4 times on the site:
NOT WORKING SCRIPT:
WORKING SCRIPT:
When press "ok" in alert popup, it works, without alert....crap...
Any ideas whats wrong?
I got very very strange problem. Since 19 of december, when all FireFox in company was upgrated automaticaly, code below stopped working. Strange thing is, when i wanted to solve it, it started to work when i've putted alert() function. Here you have working and not working examples. I'll add that this function is used about 4 times on the site:
NOT WORKING SCRIPT:
JavaScript Syntax (Toggle Plain Text)
function loadJSintoDIV(id, url, switchdiv) { obj = document.getElementById(id); if(obj.innerHTML == '' || !switchdiv) { oelem=document.createElement("script"); oelem.src=url; oelem.type="text/javascript"; oelem.defer=true; document.getElementsByTagName("head")[0].appendChild(oelem); obj.style.height = ''; obj.style.visibility = 'visible'; } else { obj.innerHTML = ''; obj.style.height = '0px'; obj.style.visibility = 'hidden'; } }
WORKING SCRIPT:
JavaScript Syntax (Toggle Plain Text)
function loadJSintoDIV(id, url, switchdiv) { obj = document.getElementById(id); alert('test'); if(obj.innerHTML == '' || !switchdiv) { oelem=document.createElement("script"); oelem.src=url; oelem.type="text/javascript"; oelem.defer=true; document.getElementsByTagName("head")[0].appendChild(oelem); obj.style.height = ''; obj.style.visibility = 'visible'; } else { obj.innerHTML = ''; obj.style.height = '0px'; obj.style.visibility = 'hidden'; } }
When press "ok" in alert popup, it works, without alert....crap...

Any ideas whats wrong?
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Javascript Problem.... (JavaScript / DHTML / AJAX)
- Javascript problem in FIREFOX (JavaScript / DHTML / AJAX)
- Javascript Problem with Firefox (JavaScript / DHTML / AJAX)
- Page Cannot Be Displayed & javascript:doNetDetect() Errors (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: [Javascript] My browser/computer doesn't like Javascript...?
- Next Thread: Filling values of a dropdown



Threaded Mode