dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: Tcobb

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    409

    Other If you are interested in asynchronous javascript,...

    If you are interested in asynchronous javascript, you might wish to explore the following topics via a search engine:

    (1) AJAX if getting data from the web server
    (2) Web Workers for local time...
  2. Replies
    7
    Views
    736

    I apologize. My code was bad and I didn't look...

    I apologize. My code was bad and I didn't look at yours closely at all.
    This does work on my machine:


    var http = require('http');
    var fs = require("fs");

    var file =('try.html');
  3. Replies
    7
    Views
    736

    If you want to grab a file, use the fs module...

    If you want to grab a file, use the fs module like so:



    http = require('http');
    fs = require("fs");

    var file =('try.html');
  4. Replies
    7
    Views
    736

    You might try something like this: var http...

    You might try something like this:


    var http = require('http');

    var page = '<html><head></head><body>Hello World!</body></html>';



    http.createServer(function (req, res) {
  5. Replies
    3
    Views
    342

    Omit the quotation marks. var a="cat"; ...

    Omit the quotation marks.

    var a="cat";

    write:


    var a = cat;
    alert(cat.name); //alerts Harmony
  6. Replies
    1
    Views
    313

    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--){ ...
  7. 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...
  8. Replies
    3
    Views
    590

    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:

    ...
  9. Replies
    3
    Views
    595

    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 . . .
  10. Replies
    3
    Views
    595

    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.
  11. Replies
    5
    Views
    698

    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
  12. Replies
    1
    Views
    557

    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...
  13. Replies
    7
    Views
    859

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

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

    ========== me, for one.
  14. Replies
    3
    Views
    613

    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...
  15. 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...
  16. 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...
  17. Replies
    7
    Views
    1,006

    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...
  18. Replies
    2
    Views
    800

    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...
  19. Replies
    9
    Views
    1,210

    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...
  20. Thread: contenteditable

    by Tcobb
    Replies
    6
    Views
    970

    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"...
  21. Thread: contenteditable

    by Tcobb
    Replies
    6
    Views
    970

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

    Try this.


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

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


    }
  22. Replies
    8
    Views
    1,201

    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...
  23. Replies
    2
    Views
    605

    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?
  24. Replies
    3
    Views
    729

    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.
  25. 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.
    ...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles