dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: Tcobb

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Here is one way to accomplish this: //global...

    Here is one way to accomplish this:


    //global variable x
    var x = {};
    x.status = true;
    x.run = function(){
    if(x.status){
    alert("This is what its supposed to do without being...
  2. Replies
    10
    Views
    2,137

    I looked at the source and the error log. Please...

    I looked at the source and the error log. Please note, among other things, that you don't have 'var' before 'FredList' in your function when you define it as an array (minor) and that you refer to...
  3. Replies
    10
    Views
    2,137

    Where is 'captionCounter' defined and set? ...

    Where is 'captionCounter' defined and set? Really I'm kind of lost here because you haven't posted enough of your code. I don't know where these variables are coming from.

    One thing you might do...
  4. Replies
    10
    Views
    2,137

    Once more, I'm not totally sure what you are...

    Once more, I'm not totally sure what you are doing, but if I understand what you are doing the problem lies in your defining a variable (an array) with the same name. Once in a global scope, and...
  5. Replies
    10
    Views
    2,137

    I'm not sure what your data file really contains,...

    I'm not sure what your data file really contains, but you might try this.


    // this part reports back blank lines, which i don't want!
    lines[i] =...
  6. Replies
    2
    Views
    949

    There may be other things wrong but the first...

    There may be other things wrong but the first thing that sticks out is how you are creating your 'distance' array. Try this instead.

    distance = [ [0,648,6476,4000],
    [648,0,6760,3470],...
  7. You might consider using sessionStorage to hold...

    You might consider using sessionStorage to hold the relevant information. If you have a general script that runs on each page that reads/adds the links stored in sessionStorage you should be able to...
  8. I note that this is in node,js. I don't know...

    I note that this is in node,js. I don't know what version you are using, but the one I am currently running does not recognize a native 'Set' object.

    But in any event (your problem may run...
  9. Replies
    1
    Views
    732

    You can't do that through a browser alone. ...

    You can't do that through a browser alone. Ideally it would send the URL off to a server which would load the page and do the data retrieval.
  10. Images in a web page need not come from the same...

    Images in a web page need not come from the same domain as the web page. You can create an HTML Image object with its src to a different domain and then feed that to the canvas element if for...
  11. jQuery You are getting paid for this and you want...

    You are getting paid for this and you want someone else to do it for you for free. You show no code, so I assume you haven't made any effort to write it for yourself.

    Perhaps someone will be...
  12. I haven't even looked at your code but when a...

    I haven't even looked at your code but when a problem like this occurs its usually because you are sending off an asynchronous task (like an AJAX request --hear bells ringing) and trying to process...
  13. Replies
    6
    Views
    1,727

    As you've probably noticed if you have tried to...

    As you've probably noticed if you have tried to run that code

    var country = {US = "2105" UK = "1103" GER = "704" ESP = "1918" AUS = "115" CAN = "304"}

    that's not a correct way to write a...
  14. Replies
    6
    Views
    1,727

    Look at generic javascript "objects," which are...

    Look at generic javascript "objects," which are essentially name-value pairs. This would probably be the easiest route to go.
  15. Replies
    10
    Views
    2,599

    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...
  16. Replies
    10
    Views
    2,599

    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...
  17. Replies
    2
    Views
    1,712

    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...
  18. --- 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...
  19. Replies
    18
    Views
    4,250

    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...
  20. Replies
    2
    Views
    1,141

    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 =...
  21. Replies
    18
    Views
    4,250

    Other The first alternative.

    The first alternative.
  22. Replies
    18
    Views
    4,250

    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...
  23. Replies
    18
    Views
    4,250

    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...
  24. Replies
    18
    Views
    4,250

    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...
  25. Replies
    4
    Views
    1,865

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



Recent Articles