CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Calling JAScript function from vb.net code

Print topic Send  topic

Author Message
uzn

Posts: 1
Posted: 10/28/2010, 7:13 AM

This is the javascript function and I'm calling this method in my vb.net code. The jsfunction printPageZB works fine but function printPage() prints only 1 page, i want 2 pages printed. What am i doing wrong here.....any suggestions?

function printPageZB() {

 window.print();

}

function printPage() {

document.getElementById('pnlPhotoBook').style.display = 'none';

window.print();

document.getElementById('pnlPhotoBook').style.display = 'block';

window.print();

 

}

vb.net code


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

 

Dim jsr As String = "<script type='text/javascript'>printPage();</script>"


Dim jsr2 As String = "<script type='text/javascript'>printPageZB();</script>"


If pnlPhotoBook.Visible = True Then


If (Not IsStartupScriptRegistered("Startup")) Then


RegisterStartupScript("Startup", jsr.ToString)

End If


Else


If (Not IsStartupScriptRegistered("Startup")) Then


RegisterStartupScript("Startup", jsr2.ToString)

End If


End If

 

End Sub

Thanks


























View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.