Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Event that fires when the value changes

Event that fires when the value changes

Scheduled Pinned Locked Moved Web Development
javascripttutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leo Smith
    wrote on last edited by
    #1

    Does anyone know of an event that fires when a value is set on an element from within JavaScript? Example: $get('id1').value = $get('id2').value (copy values between input controls). Is there an event that will fire on control 'id1' when it is modified this way? Thanks,

    Leo T. Smith Program/Analyst Supervisor

    H 1 Reply Last reply
    0
    • L Leo Smith

      Does anyone know of an event that fires when a value is set on an element from within JavaScript? Example: $get('id1').value = $get('id2').value (copy values between input controls). Is there an event that will fire on control 'id1' when it is modified this way? Thanks,

      Leo T. Smith Program/Analyst Supervisor

      H Offline
      H Offline
      Howard Richards
      wrote on last edited by
      #2

      I am not a javascript expert but I think the answer is no. You could instead have a function that updates id1, e.g. setID1(value) and then it could do the work of the event handler you want.

      'Howard

      L 1 Reply Last reply
      0
      • H Howard Richards

        I am not a javascript expert but I think the answer is no. You could instead have a function that updates id1, e.g. setID1(value) and then it could do the work of the event handler you want.

        'Howard

        L Offline
        L Offline
        Leo Smith
        wrote on last edited by
        #3

        Thanks for your answer. It was what I expected, but I want to know how in a world of security, there is not a way to see when your values have changed by someone other than the user. Thanks,

        Leo T. Smith Program/Analyst Supervisor

        H 1 Reply Last reply
        0
        • L Leo Smith

          Thanks for your answer. It was what I expected, but I want to know how in a world of security, there is not a way to see when your values have changed by someone other than the user. Thanks,

          Leo T. Smith Program/Analyst Supervisor

          H Offline
          H Offline
          Howard Richards
          wrote on last edited by
          #4

          Javascript runs on the browser. You can assume absolutely nothing about the browser or its security. It would be easy enough with modern debugging tools like FireBug etc to stop a javascript function, change some values and continue. Keep all sensitive information on the server.

          'Howard

          L 1 Reply Last reply
          0
          • H Howard Richards

            Javascript runs on the browser. You can assume absolutely nothing about the browser or its security. It would be easy enough with modern debugging tools like FireBug etc to stop a javascript function, change some values and continue. Keep all sensitive information on the server.

            'Howard

            L Offline
            L Offline
            Leo Smith
            wrote on last edited by
            #5

            Actually I ready keep the sensitive information on server only, but there comes a time when knowing when an element has changed a value could be useful. I find the reasons more compelling as I use AJAX and client side scripting. An example would be for an extender control that needs to do some action when the control that it has extended (i.e. text input) has had its value changed is used to set other internal things within the control. If there was a trigger that fired when this happened, you would not force a programmer to use your behavior to set things up when the value changed. I know that under the current paradign this is not a common occurance, but in the future it could become a greater problem in making more user friendly applications. Just my thoughts. Thanks for your time,

            Leo T. Smith Program/Analyst Supervisor

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups