Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Problems

Status
Not open for further replies.

Echilon

Programmer
Feb 22, 2007
54
GB
I'm having problems with internet explorer. At the URL below, I have a todo list. When you click an action for an item on the list, an AJAX request is sent, then a new div is created to contain the data. The new div is rolled down and the old div rolled up using scriptaculous, then the old div has it's ID removed to prevent problems with multiple IDs. I did at first try removeChild() to get rid of the old div element all-together, but I couldn't get it to work. The method I have now works fine in Firefox, but in IE, once the div has been replaced once, when you try to replace it a second time IE moans about an error on Line 607. The problem is, there are only 410 lines of source code :p.

Could someone please take a look and tell me what I could be doing wrong?

I've separated the URL to prevent it showing up in searches :)

t.nu/releases/current/index.php
 
What is the method involved not being supported?
>IE moans about an error on Line 607. The problem is, there are only 410 lines of source code
There are more lines being generated along the way, that's why.
 
Remember that any server-side code and your includes are counted as lines in the code. If you are dynamically creating and deleting objects on the page that would be altering the lines of code as well.

I generally do not use includes while developing. Once my code is working I take out the sections of code and put them into includes as needed. It makes debugging a lot easier.

Not sure if it is the cause of your problem or not but IE has a bug when dynamically adding fields where it cannot directly address the new field by it's name. The workaround is to loop through the elements array reading the name property until you find a match then addressing the field by it's position in the elements array.
In other words the name property get's set so it can be read but it does not work as a handle to directly address the field from code. You MAY be able to get around this problem using ID tags, I have not tried.


At my age I still learn something new every day, but I forget two others.
 
The problem is sorted now, it turned out to be a compatibility problem with scriptaculous.

Thanks anyway :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top