PDA

Click to See Complete Forum and Search --> : Page_Load - Javascrit window.open problem


tmashley
Jun 16th, 2003, 04:24 AM
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.

onerrorgoto
Jun 16th, 2003, 04:49 AM
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+=...

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

tmashley
Jun 16th, 2003, 05:01 AM
what is this in VB ?

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

onerrorgoto
Jun 16th, 2003, 05:07 AM
Started a new vb-project and voila

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region


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

tmashley
Jun 16th, 2003, 05:23 AM
using session variables

tmashley
Jun 16th, 2003, 05:50 AM
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>

onerrorgoto
Jun 16th, 2003, 06:01 AM
Do you have some code to show.