Results 1 to 6 of 6

Thread: Unable to activate the control in IE6

  1. #1
    Join Date
    May 2008
    Posts
    351

    Unable to activate the control in IE6

    I am quite surprised by the lack of solution on Google for my problem. I developed a calculator in php / jscript and inevitably it works on IE7 and Firefox 2 and so on, but 20% of Internet users are still on IE6. So I must also think about them.

    So that's my problem:

    Line 18
    Error Unable to activate the control because it is either invisible or inactive

    My question:

    HTML Code:
    <script type="text/javascript"> 
    //<![ CDATA [ 
    nbpages = 7; // number of tabs 
    function page (npage) { 
    list_tags = document.getElementById ("tabs").getElementsByTagName ("li"); 
    for (i = 0; i < list_tags.length; i++) { 
    list_tags[i].className = ""; 
    } 
    document.getElementById ( "tab" + npage). className = "active"; 
    for (i = 1; i <= nbpages; i++) {
    document.getElementById ("content" + i).className = "nonactive"; 
    } 
    page_elt = document.getElementById ("content" + npage); 
    page_elt.className = "active"; 
    if (page_elt.getElementsByTagName ("input") [0]! = null) { 
    page_elt.getElementsByTagName ("input") [0]. focus (); 
    page_elt.getElementsByTagName ("input") [0]. select (); 
    } 
    } 
    //]]> 
    </script>

  2. #2
    Join Date
    May 2008
    Posts
    945

    Re: Unable to activate the control in IE6

    I think let us see which triggered the error. Try to attach an event on an object which are not or can not receive this kind of method

    Code:
    if (page_elt.getElementsByTagName ("input") [0]) && window.XMLHttpRequest)
    which should work equally well

  3. #3
    Join Date
    May 2008
    Posts
    351

    Re: Unable to activate the control in IE6

    When I place an alert (page_elt.getElementsByTagName ("input") [0]) before the condition, on IE6 I [Object] and on Firefox I [Object HTMLInputElement].


    Otherwise, I have another little problem controlling my entry form (always with IE6 and then IE7, Firefox ok).

    Code:
    function validate (champtest) { 
    var number = document.getElementById (champtest). value; 
    if (!isNaN (number)) 
    {
    alert ( 'ok'); 
    }
    else 
    {
    alert ( "The seizure is not a number!"); 
    document.getElementById (champtest). value = 0; 
    }
    return false; 
    }
    Field tested example:

    HTML Code:
    <input name = "param2x15" id = "param2x15" value ="<?= variable ( "param2x15");?>" size = "8" onchange = "confirm ('param2x17') return false;"/>
    symptom: on IE6, I can no longer go on another field, the alert comes whenever I go elsewhere, while it works in IE7 and Firefox.

    Thank you again.

  4. #4
    Join Date
    May 2008
    Posts
    945

    Re: Unable to activate the control in IE6

    For the first part it means that the error is not the code that you have shown. Use a real debugger.

    http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx

    Just check whether is selected. If not then do check it and submit. You can also try with onkeypress.

  5. #5
    Join Date
    May 2008
    Posts
    351

    Re: Unable to activate the control in IE6

    Field tested:

    HTML Code:
    <input name = "param2x15" id = "param2x15" value ="<?= variable ( "param2x15");?>" size = "8" onchange = "confirm ('param2x15') return false;"/>
    JavaScript:

    Code:
    function validate (champtest) {
    var number = document.getElementById (champtest).value; 
    if (!isNaN (number)) 
    {
    document.getElementById (champtest).value = document.getElementById (champtest).value; 
    }
    else 
    {
    alert ("The seizure is not a number!"); 
    document.getElementById (champtest).value = 0; 
    }
    return false; 
    }
    it works with all browsers except IE as I press the TAB to move to the next field. With onkeypress is worse, I can not write anything at all.

  6. #6
    Join Date
    May 2008
    Posts
    945

    Re: Unable to activate the control in IE6

    ok I misunderstood. You want to launch validation when you get out of the field and not when the changes

    HTML Code:
    <input type = "text" name = "param2x15" id = "param2x15" value ="<?= variable ("param2x15");?>" size = "8" onchange = "validate (this.value,this.id);"/>
    Code:
    function validate (val,id) {
    if (isNaN (val)) {
    alert ( "The seizure is not a number!"); 
    document. getElementById (id). value = 0; 
    }
    }

Similar Threads

  1. Unable to activate iOS 6 Beta
    By messi-m in forum Portable Devices
    Replies: 3
    Last Post: 12-07-2012, 11:51 AM
  2. Unable to activate Dragon Age 2
    By Itachi Uchiha in forum Video Games
    Replies: 5
    Last Post: 15-03-2011, 10:22 AM
  3. Unable to activate Windows firewall
    By Triple-X in forum Networking & Security
    Replies: 5
    Last Post: 24-12-2009, 06:04 PM
  4. Unable to activate windows 7
    By piyush chavla in forum Operating Systems
    Replies: 5
    Last Post: 08-12-2009, 08:37 AM
  5. Unable to activate a function through C#
    By Solaris in forum Software Development
    Replies: 3
    Last Post: 24-09-2009, 09:47 AM

Tags for this Thread

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
  •  
Page generated in 1,713,568,093.41959 seconds with 17 queries