dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: Tcobb

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    1
    Views
    205

    You can use something like this: function...

    You can use something like this:


    function subtractArr(field, mainArr, badArr){
    var i, len, ret, key, tmp;
    key = {};
    ret = [];
    len = badArr.length;
    while(len--){ ...
  2. A lot depends upon what you are using the objects...

    A lot depends upon what you are using the objects for and how many of them you need to create. If you create an object with the "new" operator you have the option of adding new properties/functions...
  3. Replies
    3
    Views
    500

    Closures and scope. At first I could get the...

    Closures and scope.

    At first I could get the text to appear in the PRE tag, but no matter what button I pushed
    it read 'Button 5' --that indicated a closure problem. So, in your for loop:

    ...
  4. Replies
    3
    Views
    557

    True. I missed the fact that 'i' was the name of...

    True. I missed the fact that 'i' was the name of the argument.

    --Sorry about that . . .
  5. Replies
    3
    Views
    557

    If you look, the function is changing the value...

    If you look, the function is changing the value of global 'i' and 'bar', but it doesn't change the value of global 'foo' because a local 'foo' is declared in the function with a 'var' statement.
  6. Replies
    5
    Views
    638

    Odd. When I ran it console.log("this",...

    Odd. When I ran it
    <code>console.log("this", this.x);</code>
    did display "undefined"

    ~~~note: run on node.js, not through a browser
  7. Replies
    1
    Views
    497

    AngularJS I'm not sure what you are asking. If you just...

    I'm not sure what you are asking. If you just want to add objects to an array, you can use the standard "push" method to stick another object in the array, but I get the feeling that this isn't what...
  8. Replies
    7
    Views
    783

    A challenge to complete your homework? Who could...

    A challenge to complete your homework? Who could resist that?

    ========== me, for one.
  9. Replies
    3
    Views
    567

    It means that the code marked in red won't run...

    It means that the code marked in red won't run until two seconds AFTER the code snippet is run. And actually it could possibly take longer than that. SetTimeout inserts the function specified as...
  10. My apologies before I begin this. I'm not sure...

    My apologies before I begin this. I'm not sure this will make any sense, but here it goes:



    Maybe. Not necessarily. Forget about the notions of inheritance from inheritance dependent...
  11. In essence, whenever you try to call a function...

    In essence, whenever you try to call a function or access a property in an object it tries to find it within the local context. If it does it doesn't look any further. If it doesn't it begins...
  12. Replies
    7
    Views
    961

    The OP has not stated what this is actually...

    The OP has not stated what this is actually intended for. It should be understood that the common equation used works for distances as calculated along a geometric plane. It doesn't quite work so...
  13. Replies
    2
    Views
    739

    If you place all the text boxes within a single...

    If you place all the text boxes within a single container such as a DIV or FIELDSET element and you have no other input elements within them, you can do something like this (assume the container has...
  14. Replies
    9
    Views
    1,152

    Also be aware that "obj.style.fontSize" only...

    Also be aware that "obj.style.fontSize" only returns a quantity value if the font size is set by an inline style to begin with. If it is set by default or an internal or external stylesheet this...
  15. Thread: contenteditable

    by Tcobb
    Replies
    6
    Views
    923

    I don't know if this will work or not (I'm not...

    I don't know if this will work or not (I'm not entirely sure what you are asking for) but:

    (1) change your editable div to a CODE tag instead, as in:


    <code contenteditable="true"...
  16. Thread: contenteditable

    by Tcobb
    Replies
    6
    Views
    923

    Try this. function edit_preview() { var x...

    Try this.


    function edit_preview() {
    var x = document.getElementById ("RichTextField").innerHTML;

    document.getElementById("edit_preview").innerHTML = x;


    }
  17. Replies
    8
    Views
    1,128

    What kind of file are you talking about? Are you...

    What kind of file are you talking about? Are you talking about a web page loading a text file, and if so, from where (and how)? It can be done fairly easily from server side javascript such as...
  18. Replies
    2
    Views
    579

    Do you mean having something like a text editor...

    Do you mean having something like a text editor in an HTML page for writing HTML and an iframe in the same page that shows the result as rendered HTML?
  19. Replies
    3
    Views
    699

    You might want to take a look at leaflet.js if I...

    You might want to take a look at leaflet.js if I understand what you are wanting correctly. Just google "leaflet.js" and look at their website. Its open source.
  20. If you want something light weight on a local...

    If you want something light weight on a local network that would essentially be a web service that would return your local IP address you might want to consider Node.js, server capable javascript.
    ...
  21. About 90% of the problems I encounter in coding...

    About 90% of the problems I encounter in coding consist of typos that don't create syntax errors. And yeah-- it makes you feel stupid when you determine the source of the problem.
  22. 1. In your constructor you set "this.root" as a...

    1. In your constructor you set "this.root" as a number (zero) and then try to call it as a function: "this.root()"

    2. What is the point to "var determin" --nothing is ever done with it?

    3....
  23. Replies
    1
    Views
    882

    You might try being more specific. As I...

    You might try being more specific. As I understand it, and this might be wrong, "application/octet-stream" is a generic description which should be followed by something else such as...
  24. Replies
    7
    Views
    972

    If you pass an object in JS as an argument in a...

    If you pass an object in JS as an argument in a function and you modify it within the function that will modify it outside the function as well. Passing it as an argument to a function does NOT...
  25. Replies
    7
    Views
    972

    Check this out. The function changes the value...

    Check this out. The function changes the value of the name property of the object sent to it.
    It returns nothing, yet the original object's name is changed. If it was passed by value this could...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles