SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    NC
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Radio button onChange event only working in firefox

    Hello,

    I have written a function to be called from a radio button when an onchange event happens.

    Except for Firefox, The function doesn't even get called in this code:

    <input type="radio" value="true" onchange="disable_radios(this.form, 'page_object[blog_source]', 'none', false,'','');" name="page_object[show_blog_buzz]" id="page_object_show_blog_buzz_true" checked="checked"/>

    I then striped out the arguments of the test to this:

    <input type="radio" value="true" onchange="disable_radios();" name="page_object[show_blog_buzz]" id="page_object_show_blog_buzz_true" checked="checked"/>

    and strip the function down to:

    function disable_radios(){ alert("This is a Test!"); }

    Any ideas?
    Clem C

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Internet Explorer (at least) there is no onchange event for <input type="radio">

    I suggest you use onclick - you can test for whether or not the radio is checked from within the event handler function.


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
  •