Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid procedure or call arguement - print frame

Status
Not open for further replies.

christer99

IS-IT--Management
Joined
Dec 3, 2001
Messages
247
When I use Window.print in my Javascript, I am getting above error which seems to have something to do with the VBSCRIPT that Internet Explorer itself is using to print the screen. How can I solve this? I am getting this error on 2 out of 3 pages (a lot of javascript).
 
Perhaps you could show us the VBScript if you think it is important to solving the issue. At the moment, you know more than we do, so you're in the best position to solve your own problem.

Maybe you could give us all relevant code?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
If you're using
Code:
Window.print

you'll get an error because Javascript is case sensitive. It should be
Code:
[b][red]w[/red][/b]indow.print

Lee
 
Oh, forgot one thing. You'll need a set of parentheses with the function call, too.

Code:
window.print();

Your best bet is to copy and paste your code when asking a question so you don't have people in the forum chasing down errors you introduce accidentally that don't exist in the real code.

Lee
 
And don't ask the same question in multiple forums. If this is a VBScript question (since you asked the same thing in that forum), then don't ask it in the JS forum, and vice versa.

Lee
 
It doesn't matter what Javascript print method that I am using, right now I am using window.frames(variable).print(), but whatever I am using it causing a VB Script error in Internet Explorer's own VB code. So it is not a Javascript error, it is a VB error in IE itself. Note that this error only happens if the page is within frames. On a stand alone page, the same javascript commands works just fine.

function CPrintDoc_InitDocument( fUseStreamHeader )
{
var fReallyUseStreamHeader = (fUseStreamHeader && (dialogArguments.__IE_OutlookHeader != null));
this._anMerge[1] = (fReallyUseStreamHeader) ? 1 : 0;
this._nStatus = (fReallyUseStreamHeader) ? 0 : 1;
this.AddFirstPage();
this._aaRect[this._nStatus][0].contentSrc = (fReallyUseStreamHeader)
? dialogArguments.__IE_OutlookHeader
: this._strDocURL;
}

The actual error is caused on the 2nd to last row (: this._strDocURL;
 
Well, it is both a Javascript and a VBScript problem, since I am getting the same error regardless if I am using Javascript or VBScript to print the frame.
 
Does "this._strDocURL" exist? Try alerting it. What is the error message you are getting? Have you tried installing a debugger and stepping through your code?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top