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 3 of 3
  1. #1
    Regular Coder godofreality's Avatar
    Join Date
    Jan 2009
    Posts
    234
    Thanks
    1
    Thanked 15 Times in 15 Posts

    IE throwing an error i need fixed

    IEs error console thing from the status bar...
    Line: 93
    Char: 5
    Error: Object doesn't support this property or method
    Code: 0

    i will not post the whole code here bcuz it is very large but i will put the specific section it is referring to

    Code:
    		for ( x = 0; ( x + 1 ) <= NoG; x++ )
    			{
    			game[x] = "";
    			game[x] = document.getElementById('game'+[x]).value;
    			
    			for ( z = 0; ( z + 1 ) <= NoC; z++ )
    				{
    				eval("game"+x+"_character"+z+" = ''");
    				eval("game"+x+"_character"+z+"_server = ''");
    				eval("game"+x+"_character"+z+" = document.getElementById('game'+x+'_character'+z).value");
    				eval("game"+x+"_character"+z+"_server = document.getElementById('game'+x+'_character'+z+'_server').value");
    				}
    			}
    i know eval is "evil" and all that stuff but it is the only way to perform the job i need performed by the code now i have no clue why this is throwing an error in IE bcuz it works great in firefox

    if you can help me the help would be greatly appreciated

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,193
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    Ummm...but you don't say *WHICH* is line 93.

    Or which object the message is referring to.

    If the culprit is in one of those eval( ) calls, then the obvious debugging step is to duplicate the eval( ) call with an alert:
    Code:
    alert("game"+x+"_character"+z+" = ''");
    eval("game"+x+"_character"+z+" = ''");
    alert("game"+x+"_character"+z+"_server = ''");
    eval("game"+x+"_character"+z+"_server = ''");
    alert("game"+x+"_character"+z+" = document.getElementById('game'+x+'_character'+z).value");
    eval("game"+x+"_character"+z+" = document.getElementById('game'+x+'_character'+z).value");
    alert("game"+x+"_character"+z+"_server = document.getElementById('game'+x+'_character'+z+'_server').value");
    eval("game"+x+"_character"+z+"_server = document.getElementById('game'+x+'_character'+z+'_server').value");
    See exactly what it is trying to eval, to make sure it's what you expect.

  • #3
    Regular Coder godofreality's Avatar
    Join Date
    Jan 2009
    Posts
    234
    Thanks
    1
    Thanked 15 Times in 15 Posts
    lol ok i new i forgot sumthing when i was making the post


    line 93:
    Code:
    eval("game"+x+"_character"+z+"_server = ''");


  •  

    Posting Permissions

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