I'm working on a small project at the moment and I tried something but afcourse, it did not work.
My idea was:
With a onClick event a 'div element' covers the whole website so that all the other clickable stuff doesn't work anymore and a little centered div apears with a loading-img and some text that de content is beeing loaded.
The JS-code that I have come up with, with a few eye's looking at other script:
function Message() //Titel, Message, Loading
{
document.getElementById('fullscreen').style.visibility = 'visible';
var objContainer = document.createElement("div");
objContainer.setAttribute('id', 'objContainer');
var objTitel = document.createElement("div");
objTitel.setAttribute('id', 'objTitel');
objTitel.appendChild('Loading...');
objContainer.appendChild(objTitel);
var objContent = document.createElement("div");
objContent.setAttribute('id', 'objContent');
objTitel.appendChild('Please wait longer!!!!');
objContainer.appendChild(objContent);
//if ( Loading )
// {
var objLoading = document.createElement("div");
objLoading.setAttribute('id', 'objLoading');
objTitel.appendChild('<img src="Projects/Images/Loading.gif" />');
objContainer.appendChild(objLoading);
// }
var objFooter = document.createElement("div");
objFooter.setAttribute('id', 'objFooter');
objContainer.appendChild(objFooter);
}
With the BugConsole in FireFox I found 1 error:
Quote
Error: uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/tmpjs.js :: Message :: line 15" data: no]
On line 15 you will find:
objTitel.appendChild('Loading...');
But I do not understand the problem with this line of code.
Could someone help my out with this?
