Click here to Skip to main content
15,879,239 members

Comments by Jeremy Falcon (Top 10 by date)

Jeremy Falcon 27-Feb-17 12:29pm View    
You knocked it up? As if to say you got your code pregnant?
Jeremy Falcon 16-Aug-16 16:29pm View    
Then you'll find that there's no way of fixing this error without redesigning your application. Global_Variables.h is acting more like a main include file here, which is ok. Just look at it from a broad to narrow perspective and redesign your app... Main Parts of App > Global > Debugger, Window, Input.
Jeremy Falcon 27-Jul-16 15:43pm View    
Yes you could do that, with one notable difference, .innerHTML and .length are properties. As such you'd have to either write a wrapper method for it too, or a new prototype that calls the real one underneath the hood, but on the same object. Since code is worth a thousand words...

<script>
function id(element) {
return document.getElementById(element);
}

Object.prototype.in = function(markup) {
this.innerHTML = markup;
}
</script>

<p id="demo"></p>

<script>
// now the dom element exists
id('demo').in('i will show');
</script>
Jeremy Falcon 27-Jul-16 13:08pm View    
In this example, you're close but the "markup" parameter should be what you want to show rather than the ID. Also, for the id() function you'll need to return the value. And last but not least you need to make sure the DOM element (the paragraph in this example) exists before you can call it. Try something like this...

<script>
function id(element) {
return document.getElementById(element);
}

// this cannot be called yet because the p element does not exist
id("demo").innerHTML = "i will not show";
</script>

<p id="demo"></p>

<script>
// now the dom element exists
id("demo").innerHTML = "i will show";
</script>
Jeremy Falcon 26-Jan-16 15:45pm View    
You're welcome. It's just common sense man. Two accounts. Never used. Sounds like a sneaky app. I don't think you'll get much help from the pros here. Personally, I'll never contribute to the education of a virus writer. So in short, if you don't want to be thought of as a malware writer then don't act like one.