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
    8
    Views
    619

    Maybe I misunderstood what the OP was asking for....

    Maybe I misunderstood what the OP was asking for. I was under the impression he wanted to have a mechanism for allowing a user to click on an element if they wanted more information in which case...
  2. Replies
    8
    Views
    619

    Although there isn't currently support for this...

    Although there isn't currently support for this in IE or Firefox you might look at the HTML5 DETAILS/SUMMARY tags. I'm not totally sure but I think there is a polyfill which implements them if the...
  3. Replies
    2
    Views
    473

    1. If its on the same domain as the web page you...

    1. If its on the same domain as the web page you can use AJAX

    2. If its on a different domain you can simply use a form. If you don't want to change the primary page after sending the form info...
  4. --- nickgeek Just so you understand, a lot of...

    --- nickgeek

    Just so you understand, a lot of developers have fallen for the "work for equity" thing, which in many real life incidents actually translates as "you get to do all the work, and if...
  5. Replies
    18
    Views
    1,599

    Other You are welcome. As a parting comment I would...

    You are welcome. As a parting comment I would urge you, from a performance perspective, to incorporate the code from the "goDeep" function into the "objSort" function. If you have a lot of entries...
  6. Replies
    2
    Views
    304

    When you use "document.getElementById" it returns...

    When you use "document.getElementById" it returns a reference to the HTML element rather than what it contains, which is the number value you want.

    Instead of

    var a =...
  7. Replies
    18
    Views
    1,599

    Other The first alternative.

    The first alternative.
  8. Replies
    18
    Views
    1,599

    Other Okay-- I assumed (incorrectly) that the objects...

    Okay-- I assumed (incorrectly) that the objects in the array had properties whose values were 'primitives' rather than objects in which you would need to seek further down. As written the function I...
  9. Replies
    18
    Views
    1,599

    Other Whoops--- I didn't explain how to do a...

    Whoops---

    I didn't explain how to do a "nested" sort with this. Basically you just resort from least to most important field. For example, lets say you have an array of objects each of which...
  10. Replies
    18
    Views
    1,599

    Other This should do it for you: function...

    This should do it for you:


    function objSort(arr, field, mode){
    var i, len, val, unique, all, ret;
    unique = []; all = {}; ret = [];
    len = arr.length;
    for(i = 0; i < len; i++){
    val...
  11. Replies
    4
    Views
    496

    Although there will be problems with older...

    Although there will be problems with older browsers, you can iterate through the <a> elements and check their someElement.textContent as well.
  12. Replies
    8
    Views
    890

    It can be done if you don't mind committing what...

    It can be done if you don't mind committing what is (to some people) the unpardonable sin of using 'eval'


    function speak(){ //just prints all args sent to it
    var i, z = arguments.length;...
  13. Replies
    2
    Views
    483

    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...
  14. Replies
    7
    Views
    1,012

    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');
  15. Replies
    7
    Views
    1,012

    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');
  16. Replies
    7
    Views
    1,012

    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) {
  17. Replies
    3
    Views
    433

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

    Omit the quotation marks.

    var a="cat";

    write:


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

    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--){ ...
  19. 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...
  20. Replies
    3
    Views
    673

    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:

    ...
  21. Replies
    3
    Views
    647

    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 . . .
  22. Replies
    3
    Views
    647

    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.
  23. Replies
    5
    Views
    743

    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
  24. Replies
    1
    Views
    577

    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...
  25. Replies
    7
    Views
    913

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

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

    ========== me, for one.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles