Unfortunately I'm not seeing the same problem as you are. I'm trying to
reproduce this problem using VBScript and events. Here is what I'm working
with, which seems to work properly.
script language="vbscript">
'-------------------------------------------------------------------'
' This demonstrates catching an event '
'-------------------------------------------------------------------'
function AdView_OnEndLoadItem(name, data, result)
if name = "DOCUMENT" then
AdView.Viewer.ToolbarVisible = false
AdView.Viewer.PaperVisible=false
AdView.Viewer.ExecuteCommand("FITTOWINDOW")
end if
end function
/script>
Please try this code and see if you still have a problem.
"felipe2k3"
wrote in message
news:f1a01fa.0@WebX.maYIadrTaRb...
> Reposting code sample to make it easier to read:
>
> // Change the Express Viewer path
> oCAdViewer.SourcePath="test.dwf";
> // Change the viewer properties
> with (oCAdViewer.Viewer)
> {
> &nsbp;&nsbp;// Wait until the page finishs loading
> &nsbp;&nsbp;WaitForPageLoaded();
> &nsbp;&nsbp;// Hide the toolbars
> &nsbp;&nsbp;ToolbarVisible=false;
> &nsbp;&nsbp;// Hide the paper background
> &nsbp;&nsbp;PaperVisible=false;
> &nsbp;&nsbp;// Execute this command
> &nsbp;&nsbp;ExecuteCommand("FITTOWINDOW");
> }
>