Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    radiobutton image will not swap on IE7

    hello!

    http://www.amoweb.gr/buildnet/v4/main.php

    The problem with this site is that reset button wont function properly in IE7 and i guess older versions as well.
    If you click the first (blue) tab , and check some boxes , then the reset button should reset the form.
    The checkboxes are in fact radio buttons that use either a "checked" or "unchecked" image.
    On the radioboxes it swaps the "checked" to "unchecked" image dynamicaly. It works fine on Firefox 3 but not on IE7. After some research I have come to the conclusion that IE7 works only on a static DOM so what i am tryin to do is not possible in IE7.

    here is the piece of javascript that swaps the images when reset is called :

    function resetForm(inFormName){

    forma = document.getElementById(inFormName)

    with(forma){

    for(var element in elements){
    element = elements[element];

    if(element){
    if(element.type!==null && element.type!==undefined){
    // Only do reset if it's allowed

    imgid = 'img' + element.id;
    if (document.getElementById(imgid)) {
    img = document.getElementById(imgid);
    if (element.checked) {
    file = img.src.replace(/checked/, "unchecked");
    img.src = file;

    }
    }
    }
    }
    }
    }
    }
    Again , it works fine on FF3 but not on IE 7. Is there anyway to make it work on IE or am i just wasting my time?

    Thanx in advance!!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    your link drove us to a non-existent document
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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