Change id of element in DOM, IE7...



I have some javascript to rearrange a list of elements...

1) Each element (div) is initially given a unique id, the same id of
the database record the element represents.
2) User "moves" element from slot 3 to slot 6, for example (result: 3-
6, 6->5, 5->4, 4->3).
3) I copy the innerHTML of each div (3-6) into an array.
4) I set the innerHTML of each div (3-6) to now contain the
appropriate content from the array.
5) I update the id's of each div (3-6)...

Seems simple enough for me, and seems to work flawlessly in Firefox...

IE7, however, seems to forget the effects of step 5, so on the second
"move," step 4 puts the innerHTML's in the wrong slots...grrrrrr...any
ideas?
.



Relevant Pages

  • passing parameter problems
    ... I'm designing a website in dreamweaver and I'm using JavaScript to ... The text is contained in <div> tags. ... The following set up works fine, calling moveParas which moves two div ...
    (comp.lang.javascript)
  • Re: Hide/Show Selection List
    ... A div is a BLOCK element, meaning that is rectangle with some content. ... a SPAN is an inline element, eg a part of a sentence. ... For span you should use inline. ... you are using a suspect/bad way to invoke a javascript function. ...
    (comp.lang.javascript)
  • Re: viewable coordinates of an element
    ... javascript and web design as a whole, ... Is there a way to like when i scroll the DIV to this element, ...
    (comp.lang.javascript)
  • cant set mouse cursor
    ... I'm writing a panoramic image viewer in javascript. ... (which covers the same area as the div), ... The html is ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: "Popup" window
    ... You can also find help with the Ajax SDK if you want to use JavaScript stuff without coding it and with the possibility to use it as server controls: ... in case JS is not enabled in a user's browser the alternative html ... No.The example of link I provide displays the DIV if JavaScript is ... HTML form. ...
    (microsoft.public.dotnet.framework.aspnet)