CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> .NET

 Calling JAScript function from code

Print topic Send  topic

Author Message

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

This is the javascript function and I'm calling this method in my 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() {



function printPage() {

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


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



} 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


If (Not IsStartupScriptRegistered("Startup")) Then

RegisterStartupScript("Startup", jsr2.ToString)

End If

End If


End Sub


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

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