Determining the exact location and current state of any controls

Discussion in 'Javascript' started by Peter Olcott, Aug 15, 2006.

  1. Peter Olcott

    Peter Olcott Guest

    Someone told me that determining the exact location and current state of any
    JavaScript controls is pretty easy. Does anyone know exactly how this is done?
     
    Peter Olcott, Aug 15, 2006
    #1
    1. Advertisements

  2. Peter Olcott

    Evertjan. Guest

    Peter Olcott wrote on 15 aug 2006 in comp.lang.javascript:
    Javascript has no controls.

    Perhaps you are using asp.net controls?

    Try over at microsoft.public.dotnet.framework.aspnet.
     
    Evertjan., Aug 15, 2006
    #2
    1. Advertisements

  3. Peter Olcott

    Matt Kruse Guest

    Depends. In some cases, finding location is easy. In others, it's not so
    easy.

    Generalized code which handles most cases to find an object's location can
    be found here:
    http://www.javascripttoolbox.com/lib/objectposition/

    You're too vague about what "current state" means and what "javascript
    controls" are to be more helpful than that.
     
    Matt Kruse, Aug 15, 2006
    #3
  4. Peter Olcott

    Peter Olcott Guest

    I need this to work for every webpage. I heard that Ajax can do this, and
    JavaScript is a part of Ajax.
     
    Peter Olcott, Aug 15, 2006
    #4
  5. Peter Olcott

    Peter Olcott Guest

    Controls are such things as checkboxes and pushbuttons, and current state would
    be things such as whether or not the checkbox is currently checked or unchecked.
     
    Peter Olcott, Aug 15, 2006
    #5
  6. Peter Olcott

    Evertjan. Guest

    Peter Olcott wrote on 15 aug 2006 in comp.lang.javascript:
    Perhaps you could call them html-controls, though that term is NOT used,
    except in asp.net.

    checkboxes and pushbuttons certainly are not javascript controls.
     
    Evertjan., Aug 15, 2006
    #6
  7. Peter Olcott

    Sym Guest

    Ajax stands for Asynchronous Javascript and XML, Ajax is irrelevent in
    this question, it is a technique for your scripting language to
    communicate with a back end server.

    Java script itself can look at the browsers dom and deterrine the
    "state" of many of the objects. Also compiled programs such as c++ will
    be able to do the same with the browser window.


    rgds
    Sym.
     
    Sym, Aug 15, 2006
    #7
  8. Peter Olcott

    Peter Olcott Guest

    How would compiled C++ do this?
     
    Peter Olcott, Aug 15, 2006
    #8
  9. Peter Olcott

    Evertjan. Guest

    Peter Olcott wrote on 15 aug 2006 in comp.lang.javascript:
    Simple:

    Like any other serverside programming
    it would have to generate a html cum clientside code stream
    that is sent to the client.

    ....... I suppose.
     
    Evertjan., Aug 15, 2006
    #9
  10. .... or, as the HTML specification names them: form controls.

    /L
     
    Lasse Reichstein Nielsen, Aug 15, 2006
    #10
  11. Peter Olcott

    Evertjan. Guest

    Lasse Reichstein Nielsen wrote on 15 aug 2006 in comp.lang.javascript:
    Is that an imperative? ;-)
     
    Evertjan., Aug 15, 2006
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.