SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    does this cause an event to fire

    If I have some form element, a textbox for example, and I manipulate the value in it by some other means that actually using the textbox like changing the value with javascript

    document.getElementById('textbox1').value = 'blah';

    Does this cause an event to fire?

    The issue is that I want to fire off some javascript in the event that the value changes...I can use onkeyup, onchange, etc... while in the box but the user can also manipulate the value by doing something else on the page.

    Thanks in advance.

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nails11 View Post
    document.getElementById('textbox1').value = 'blah';

    Does this cause an event to fire?
    No, unless you use onpropertychange that is only supported in IE.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Location
    USA
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is an internal app at work that is only IE, so this may work. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •