Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6335459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:51:46+00:00 2026-05-24T18:51:46+00:00

For printing my Aspx web page I use following code but in IE I

  • 0

For printing my Aspx web page I use following code but in IE I encounter “Stack over flow at line:0” error message and in fire fox any thing doesn’t happen.
what’s wrong?

<head>
 <script language="javascript" type="text/javascript">
        function print() {
            window.print();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
<div class="toolbar" style="width:400px">
            <ul>
<li>
                <img alt="" src="../../../CssImages/printer_128.png" id="ImgPrint" width="20px" style="cursor:pointer" onclick="print()"/>
                </li>
     </ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:51:46+00:00Added an answer on May 24, 2026 at 6:51 pm

    Your function:

    function print() {
        window.print(); // <-- refers to this custom function
    }
    

    will put print into the global object as window.print. So in fact you’re calling the function itself, which calls itself, etc. This will continue forever which causes an overflow.

    Because window.print is already defined natively, why not eliminate the custom function? If you remove function print() {...} it should work fine, because it will then call the ‘real’ window.print (as print is just a shortcut to window.print), which actually does the printing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When printing a report, the user sometime have the following error: CrystalDecisions.CrystalReports.Engine.LogOnException: Error in
Hi I have a silverlight web app, in the default.aspx there is nothing but
I am printing reports as tables in .aspx page Now i want to print
I just added printing capability to a web site using a style sheet (ie.
I'm printing out the stack trace in my app at various points to debug
Besides printing stuffs for the console what other use have you found for toString()
I found a code of winform here: http://www.wincustomize.com/articles.aspx?aid=136426&c=1 And it works fine as a
I have a FancyBox help link, on an ASP.Net aspx page, that is registered
I receive the following error when attempting to Step Into a process using F11
While printing contents of a NSTextField the debugger is displaying following character sequence \342\200\250

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.