PDA

View Full Version : DIV Size problem


pistonz
05-24-2006, 04:13 PM
Hi,

i have a webpage generated by a SAP application that defines an object DIV and inside an object iframe. Inside the iframe, there's a PDF document which will appear after a a click, so after the load of the page, i only have the iframe and an image in the future place of the PDF.

The DIV has absolute dimensions, but the problem is that sometimes after the loading of the page, the dimensions are different. Like 15 % of the times, the DIV is generated very small, really small. I ahve done a lot of tests and i can't find a pattern for the error, sometimes it's OK and sometimes it's NOK, but i can't figure out why...

Does anyone had a similar experience?

Here is the code:

<div border=0 class="htmlviewer" id="cnt36CONT" style="position: absolute; left:0;top:286;width:707;height:484; font-family: arial, helvetica, sans-serif; font-size:9pt; " > <!-- Control Container -->


<iframe tabindex="9" id="cnt36" rtl="no" style="width:100%;height:100%" src="/scripts/wgate/pz11/~flN0YXRlPTg2ODkuMDAxLjAyLjAy====/-1965405074.102/data/1/HTML000001.HTM">
</iframe>

</div>

This is the correct view, in 85% of the times. In the wrong view of the page, the code is generated with the dimensions of the div like "0;286;112;22", something like that...

In my computer now, it's always good, but in another computer it's still doing the bad generation... I don't know if the Windows did some kind of update to the browser....

I can't give you the link, it's Intranet...

Thanks for the help,

Paulo A.

martinpa
05-24-2006, 04:21 PM
I don't have a vivid imagination, I would have to see the page in action.

But I would try the following:

- add a doctype to your page, this will get you out of quirks mode

Replace

<div border=0 class="htmlviewer" id="cnt36CONT" style="position: absolute; left:0;top:286;width:707;height:484; font-family: arial, helvetica, sans-serif; font-size:9pt; " > <!-- Control Container -->

With

<div class="htmlviewer" id="cnt36CONT" style="position: absolute; left:0; top:286px; border: 0; width:707px !important; height: 484px; font-family: arial, helvetica, sans-serif; font-size:10px; " > <!-- Control Container -->

pistonz
05-24-2006, 04:34 PM
The problem is that this is generated by a standard SAP transaction.. i just can't change the way he generates the html... i was thinking it could be a browser update ou something... because sometimes it's good and others it's bad...

Thanks,

drhowarddrfine
05-24-2006, 06:44 PM
Validate your code and check for errors; particularly missing end tags.