I've spent the good part of the week trying to publish a website containing QV objects. The reason I've dallied is because I haven't gotten access to the Objects' styles, and the current rendering of all textboxes features rows that are too small for the words inside them, which shows me words cut in half.
2. Init isn't declared with the var keyword and the function expression doesn't end with a semi-colon nor does it have final parentheses or grouping operators. Also, your else code block is the same as the if one. So if the document exists, an alert box is supposed to say "Got Document" and, if it doesn't, you also get an alert box that says "Got Document". So how are you supposed to distinguish between the two? The else alert box should obviously say "No Document" or something like that. Here is what I believe that whole section should look like:
I am indeed fairly new to JS but I see these mistakes I made were a little trivial. I still don't fully understand closure, or the trailing parenthesis pair, but I'm seeing them more and more as I get examples of good code.