Results 1 to 7 of 7

Thread: Page_Load - Javascrit window.open problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128

    Page_Load - Javascrit window.open problem

    Hello,

    I have searched on how to do this but can't find anything, please help me...

    I have a web application that produces crystal reports within a new window, using window.open

    this new window has the code to export the crystal report into a .pdf format within the window on Page_Load.

    but,

    when i close this window and try to produce a new report with different parameters the Page_Load doesn't run and the same report is displayed!

    i tested what would happen if i deleted the temporary internet files before clicking the button that runs the window.open code, and it works,

    so...

    how can i delete the temporary internet files from the client machine.


    or...

    Can anyone think of another way to get the Page_Load to run?

    Please help,
    thanks!

    Tom

    Note1: i am using vb.net with aspx.vb code behind files for the page load.
    Note2: the client machines have different operating systems on them.

  2. #2
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    sounds strange

    Am using c# myself but when I put a breakpoint on pageload and use window.open(...) it always triggers my breakpoint.
    We always use window.open(...) and call different subs from pageload with the inparam.
    How are you sending the different params? are you using querystrings?

    Check that you have this line (or similar i vb) this.load+=...
    VB Code:
    1. #region Web Form Designer generated code
    2.         override protected void OnInit(EventArgs e)
    3.         {
    4.             //
    5.             // CODEGEN: This call is required by the ASP.NET Web Form Designer.
    6.             //
    7.             InitializeComponent();
    8.             base.OnInit(e);
    9.         }
    10.        
    11.         /// <summary>
    12.         /// Required method for Designer support - do not modify
    13.         /// the contents of this method with the code editor.
    14.         /// </summary>
    15.         private void InitializeComponent()
    16.         {    
    17.             this.Load += new System.EventHandler(this.Page_Load);
    18.  
    19.         }
    20.         #endregion
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    what is this in VB ?

    this.Load += new System.EventHandler(this.Page_Load);

  4. #4
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Cool Oops

    Started a new vb-project and voila
    VB Code:
    1. #Region " Web Form Designer Generated Code "
    2.  
    3.     'This call is required by the Web Form Designer.
    4.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    5.  
    6.     End Sub
    7.  
    8.     'NOTE: The following placeholder declaration is required by the Web Form Designer.
    9.     'Do not delete or move it.
    10.     Private designerPlaceholderDeclaration As System.Object
    11.  
    12.     Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    13.         'CODEGEN: This method call is required by the Web Form Designer
    14.         'Do not modify it using the code editor.
    15.         InitializeComponent()
    16.     End Sub
    17.  
    18. #End Region

    But, how are you passing in your params when opening your form via window.open?
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    using session variables

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    and

    <script language="javascript">
    function newWindows()
    {
    window.open('Report.aspx', "", "width=1014,height=741,top=0,left=0,toolbars=no,border=no,scrollbars=no,status=no,resizable=no") ;
    }
    </script>

  7. #7
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    code?

    Do you have some code to show.
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width