Results 1 to 10 of 10

Thread: Dissapearing Images and outerHTML

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    Dissapearing Images and outerHTML

    I am using asp to build a table via info pulled from a database then I am using outerHTML to overwrite the table from a hidden fram to reflet the new data. Occasionaly my images that are in the cells of this table dissapear (the code is there but they dont display). Has anyone had a problem with this or does anyone have any suggestions?
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    I've had a similar problem using with this sort of thing when using netscape...sometimes it just doesn't display all the images. If its in Internet Explorer then its new to me...
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    it seems others have had this problem also. I found this at google. It has a solution but I was not able to figure it out.
    Google Groups View Thread missing images
    michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Yeah, at least according to that microso$t guy its a known bug.

    Try using a combination of insertAdjacentHTML, innerHTML & outerHTML until you can force a refresh.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I tried doubling my outerHTML statement and that didnt work. And I coulden't get the MS guy's insert adjacent to work at all (due to being jscript?).
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  6. #6
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    JScript and Javascript are very similar though. It should work with Javascript... try reading the docs for it http://msdn.microsoft.com/library/de...jacenthtml.asp
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  7. #7

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    jscript/javascript is not my stong point and I am having a problem with it.
    I am getting the error:
    Invalid target element for this operation

    Code:
    parent.frames[0].document.all.roomratetable.outerHTML = '<table id="roomratetable"><tr><td>test</td></tr></table>';
    parent.frames[0].document.all.roomratetable.insertAdjacentHTML('beforeend', '<img id="imghack" style="display:none" src="dot.gif" height="1" width="1">');
    my string that inserts the table is much longer than that so for the boards sake i cut it down
    thanks
    michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  8. #8
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    try changing it to

    parent.frames[0].document.all("roomratetable").outerHTML
    or if you are using IE 5+/NS6 use
    parent.frames[0].document.getElementById("roomratetable").outerHTML.

    If that still doesn't work try putting parent.frames[0].focus() before the code. Javascript is strange when it comes to Frames at times.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  9. #9

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    sorry, forgot to specify, the outerHTML is fine... its the insertAdjacentHTML that is getting the error
    thanks
    michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  10. #10

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I finished the rest of the project and now back to this problem... anyone have anyideas ? (keep in mind this is friday, the sooner I get done the sooner I can take off )
    thanks
    michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

Posting Permissions

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



Click Here to Expand Forum to Full Width