SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question force onchange event

    i need to force the onchange event on a list box when the page loads. but when i call it, i get an error and i can't seem to find the reason for it.
    Code:
    cat=document.getElementById('category');
    cat.onchange();
    throws this error: cat.onchange(); is not a function

    so what am i doing wrong?

  2. #2
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind - figured it out. I guess you can't have to elements named the same, huh?


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
  •