PHP Classes

Hidden Div IE/Opera Prblem

Recommend this page to a friend!

      PHP Classes blog  >  Accelerate Page Loadi...  >  All threads  >  Hidden Div IE/Opera Prblem  >  (Un) Subscribe thread alerts  
Subject:Hidden Div IE/Opera Prblem
Summary:I may have a solution for your problem with IE/Opera
Messages:8
Author:Scott Baker
Date:2010-10-21 12:41:49
Update:2010-10-24 11:19:17
 

  1. Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of Scott Baker Scott Baker - 2010-10-21 19:00:19
I dunno if you have tried this already but instead of loading your remote content in hidden div tags (which IE usually always messes up any operation on a hidden item) try moving the divs off the page (left: -999px) or something.

I find that always works for me in both IE and Opera for this type of operation.

  2. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-10-22 05:08:38 - In reply to message 1 from Scott Baker
That may be something that may work. I will try it and will let you know if it worked. Thanks for the suggestion.

  3. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of yapyoup yapyoup - 2010-10-22 07:08:46 - In reply to message 1 from Scott Baker
I comfirm.
I use this method too, instead of hidden div, and it's a real alternative for IE.
Great job, guys

  4. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of capitanqueso capitanqueso - 2010-10-22 21:13:53 - In reply to message 1 from Scott Baker
Sorry I ask, I'm really new to this.
Can any one put an example? is the only way I understand this kind of things
How do I move a DIV? Should it be via CSS?
Sorry been too lazy to not use google but what better source than here?

  5. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-10-22 22:21:04 - In reply to message 4 from capitanqueso
As explained in the article, you can use the Fast Page Content Loader object, which is a JavaScript object that takes care of all the details for you:

jsclasses.org/package/24-JavaScript ...

There is a tutorial article on how to use it here:

jsclasses.org/blog/package/24/post/ ...

  6. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of capitanqueso capitanqueso - 2010-10-23 05:24:49 - In reply to message 5 from Manuel Lemos
Oh, @ManuelLemos excuse my english I was replying to @ScottBaker and his fix on how to "move a DIV" (for opera and IE)
Can you made a .htm and a .css (I guess in this case)?, so we can see what is he talking about.
Thanks!!
PS: I really never read any book of coding (get). I just "read" the code (like in matrix) I'll never know what is a "child" or any other technical stuff but if I see and read the code I'll "compile" in my head to understand it.

  7. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-10-24 04:44:36 - In reply to message 1 from Scott Baker
I tried this and it does not help.

The problem is that some dynamically retrieved content using JavaScript uses new document.write calls which end up writing to the document after the hidden div. On IE and Opera that always happens regardless of the way you hide the div.

The solution seems to be to implement a replacement document object that captures the calls to document.write and assures that the content is appended inside the div.

I have an idea how to do that, but it is not trivial. I will need more time to come with a full solution. Meanwhile on IE and Opera the Fast Content Loader object will just load the original slow content tags where they should be.

  8. Re: Hidden Div IE/Opera Prblem   Reply   Report abuse  
Picture of capitanqueso capitanqueso - 2010-10-24 11:19:17 - In reply to message 7 from Manuel Lemos
Thanks @manuel for clarifying that, no surprise about IE or Opera, the last one as been always my favorite browser like for ever. Though, the last years have become a pain in the @rs for me and some people says is not even their fault so it's the lousy coders fault, cause they just don't attach to the specifications or something, but who cares? Opera still not showing the pages like you see in the others browsers and seems to have a big trouble dealing with javascripts that I'll not have time to write them all.