[CLOSED] Invalid procedure call or argument

  1. #1

    [CLOSED] Invalid procedure call or argument

    We have a print button placed in a EXT window as shown in the code below.

    Everything works fine with the Print function, except we had one user who complained that all of his web pages print fine except when using this "Print" button.

    The user gets the following error:
    "An error has occurred in the script on this page
    Line 2021
    Invalid procedure call or argument
    Do you want to continue running scripts on this page
    URL (always res://ieframe.dll/preview.dlg)

    Any suggestions as to what could be causing this?

     Private Shared Function renderViewSpecWin(ByVal WindowsID As String, WindowTitle As String, TransId As String)
     Using wViewSpec As New NetAlias.Window() With {.ID = WindowsID, .Width = "800", .Header = True, .Title = WindowTitle, .CloseAction = NetAlias.CloseAction.Close, .Height = "600"}
                With wViewSpec
    
                    'Create a 'Back' for Panel 
                    Dim tBar As New NetAlias.Toolbar()
                    tBar.Add(bBack)
                    
                    Dim bPrinter As New NetAlias.Button("Print", String.Format("printSelection(document.getElementById('{0}_IFrame'));return false;", WindowsID)) With {.Icon = NetAlias.Icon.Printer}
    
                    tBar.Add(bPrinter)
                    .TopBar.Add(tBar)
    
                    With .Listeners
                        With .Close
                            .Handler = "grTransGrid.getStore().reload(null);"
                        End With
                    End With
    
    
                     .AutoLoad.Url = "TransGrid.aspx"
                    .AutoLoad.Method = NetAlias.HttpMethod.POST
                    .AutoLoad.Mode = NetAlias.LoadMode.IFrame
                    .AutoLoad.Params.Add(New NetAlias.Parameter("TransId", TransId))
    
                    .Render()
                End With
            End Using
        End Function

    Thanks

    Ravi Swaminathan
    Last edited by Daniil; Apr 06, 2012 at 7:09 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I guess the issue is reproducible in IE8 or lower only, isn't that so?

    I would try to print an iframe in the context of that iframe.

    Please try:
    String.Format("{0}.getBody().print();", WindowsID)
    instead of the printSelection calling.
  3. #3

    Re: Invalid procedure call or argument

    Thanks, Daniil.

    Yes,you are correct. The user had IE7. We had her upgrade to IE8/9 and the problem went away.

    Thanks again.

    Ravi

Similar Threads

  1. [CLOSED] Invalid argument in IE, not Firefox
    By jthompson in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 14, 2011, 3:40 PM
  2. [CLOSED] IE8 combo "Invalid argument" on z-index
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2011, 10:10 AM
  3. help for a beginner! as a procedure call ?
    By julioc_m18 in forum 1.x Help
    Replies: 6
    Last Post: Feb 09, 2011, 11:49 PM
  4. Replies: 11
    Last Post: Feb 06, 2009, 7:45 AM
  5. Sqldatasource - Update With Stored Procedure
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Jan 20, 2009, 8:51 PM

Posting Permissions