Link to home
Start Free TrialLog in
Avatar of pod_mighster
pod_mighster

asked on

Problem with DHTML print template in IE 6 version 6.0.2800

Hello All,

I'm having a strange problem wonder if anyone can help, I
have some code which display a dynamic page in a print
template which works fine on my machine running IE with
version 6.0.2600, but as soon as I move to a different
machine running a slightly newer version of the browser
it seems to display the print template but the content
isn't pulled in anymore. The code is as follows:

<HTML XMLNS:IE>
<HEAD>
<IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">

<STYLE TYPE="text/css">
..masterstyle
{
    width:21cm;
    height:29.7cm;
    background:white;  
      border-left:1 solid black;
      border-top:1 solid black;
      border-right:4 solid black;
      border-bottom:4 solid black;
    margin:10px;
}
..contentstyle
{
  width:17.0cm;
  height:26.0cm;
  margin:1.8cm;
  background:white;  
  border:1 dashed gray;
}
</STYLE>

</HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- data.php<?=$url_string?>
var lastPage = 1;

function addFirstPage() {
  newHTML  = "<IE:DEVICERECT ID='devicerect1'
MEDIA='print' CLASS='masterstyle'>";
  newHTML += "<IE:LAYOUTRECT ID='layoutrect1'
CONTENTSRC='data.txt' ONLAYOUTCOMPLETE='onPageComplete()'
NEXTRECT='layoutrect2' CLASS='contentstyle'/>";
  newHTML += "</IE:DEVICERECT>";

  devicecontainer.insertAdjacentHTML("afterBegin",
newHTML);
}

function onPageComplete() {
  if (event.contentOverflow) {
    document.all("layoutrect" +
lastPage).onlayoutcomplete = null;
    newHTML  = "<IE:DEVICERECT ID='devicerect" +
(lastPage + 1) + "'MEDIA='print' CLASS='masterstyle'>";
    newHTML += "<IE:LAYOUTRECT ID='layoutrect" +
(lastPage + 1) + "' ONLAYOUTCOMPLETE='onPageComplete()'
NEXTRECT='layoutrect" + (lastPage + 2) + "'  
CLASS='contentstyle'/>";
    newHTML += "</IE:DEVICERECT>";

    devicecontainer.insertAdjacentHTML("beforeEnd",
newHTML);
    lastPage++;
  }
}
// -->
</SCRIPT>

<BODY ONLOAD="addFirstPage()">

<DIV ID="devicecontainer">
<!-- Pages created on the fly go here. -->
</DIV>

</BODY>
</HTML>

I think theres either a bug in the newer versions of IE
or something has changed.

Any help is appreciated.

Pod Mighster.
Avatar of VincentPuglia
VincentPuglia

Hi,

  check http://msdn.microsoft.com for bugs

Vinny
Avatar of pod_mighster

ASKER

Hello Vinny,

Sorry about the delay, I've had a look on their site can't find anything about IE6 service pack 1 bugs, but that doesn't mean its isn't there :). The site tends to be out of date has information on eariler browsers.

I have now narrowed the problem down to this command
CONTENTSRC='data.txt'

It's really annoying this problem as I had it all working,

Any further suggestion are appreciated.

Cheers.

Pod Mighster.
Hi,

   Are the paths the same on both machines?  I'm presuming you are on an intranet. -- perhaps the paths/drives are different from one machine to the other.

Vinny
Hi,

Well...

I don't think its a path problem as I had an earlier version of IE on my machine which the scripts worked with, then I upgraded to latest browser and then the contents stop being displayed.
 
Pod.
Sorry pod,

   out of ideas.  if I get a chance I'll see if I can find anything with search.

Vinny
actually, there's a forum at msdn.  You might try posting there
Thanks for your help anyways,

I've tried posting on the msdn forum, not been successful - (plus im now being spammed to death by microsoft).

but anyways, i've tried email the guy that came up with the orginal example of how its done, see if he has any ideas.

Thanks again for your help.

Pod.
Avatar of Asta Cu
Please finalize this or update us with what else is needed (since much time has passed since last update). If one expert helped you, choose that comment to convert it to the accepted answer and flow points to close this. If more than one expert helped you, choose the Split Points option to share the points among experts you choose. Your feedback is integral and appreciated. If you need special handling help, please make that request in the Community Support topic area, and include this question's URL (link).  The Community Support topic area link is:  https://www.experts-exchange.com/Community_Support/

Recommend checking with WindowsUpdate for a Critical Security Patch announced today. Details here:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms04-004.asp

Thanks,
Asta
pod_mighster,
No comment has been added lately (15 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: PAQ/No Refund

Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


Thanks,
astaec
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of PashaMod
PashaMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am having this issue too so BUMP.
Hi, trentbrubaker.  Since this question has been closed and moved to our PAQ, recommend posting a new question to draw current attention and include as much about your environment as you can as well as sample links (if applicable).  Include the OS and version as well as the Browser and version in your new question to expedite the process for you and get the solution, and please remain active in your question so it can be brought to an excellent conclusion in the collaboration process.
Thanks, and thanks also to PashaMod for helping on the cleanup effort for questions which are not finalized by askers.
Asta