[Javascript] Re: Javascript Digest, Vol 39, Issue 21

Mike Dougherty mdougherty at pbp.com
Wed May 24 07:13:26 CDT 2006


have you tried a CSS "Print" stylesheet?

On Tue, 23 May 2006 23:59:38 -0700 (PDT)
  Jai Sankar N <pnjaisan at yahoo.com> wrote:
> Dear All,
>   
>  Good morning to all of software guys, and advance thanks to those resolve my problem.
>   
>  i have result publication page. this page is devloped using C#.Net is working fine. but i want 
>to take a print out that page. while printing the page i would like print only selected area(that 
>is with out printing save, print and back button and left frame).
>   
>  i'm tried this one....
>   
>  <language="javascript" type="text/javascript">
>  function pagePrint()
>  {
>  window.print();
>  }
>  </script>
>   
>  my C# code.
>   
>  void private butPrint_Click(object Sender, System.EventArgus e)
>  {
>  butPrint.Attributes.Add("OnClick","pagePrint();");
>  }
>   
>  it will print all the page and also cutted in my right side.
> 
>  Please, resolve my problem and how to print the specific area.
>   
>  thanks to all
>  Jai Sankar
>  India.
>  
> javascript-request at LaTech.edu wrote:
>  Send Javascript mailing list submissions to
> javascript at LaTech.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.LaTech.edu/mailman/listinfo/javascript
> or, via email, send a message with subject or body 'help' to
> javascript-request at LaTech.edu
> 
> You can reach the person managing the list at
> javascript-owner at LaTech.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Javascript digest..."
> 
> 
> Today's Topics:
> 
> 1. Re: AJAX app causing excessive browser memory usage (Rick Emery)
> 2. Re: AJAX app causing excessive browser memory usage (Rick Emery)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 23 May 2006 12:24:57 -0400
>From: Rick Emery 
> Subject: Re: [Javascript] AJAX app causing excessive browser memory
> usage
> To: javascript at LaTech.edu
> Message-ID: <20060523122457.5k5n9jgc2kg00k4o at www.emery.homelinux.net>
> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
> format="flowed"
> 
> Quoting Jonathan Buchanan :
> 
>> The problem in this case is that when handleXHRResponse() is called,
>> "this" no longer refers to your xhrObj instance. You can use the
>> built-in call[1] or apply[2] functions to execute the function in the
>> scope of your xhrObj instance.
> 
> Just a quick note to say "thanks". I had worked around this by 
> creating the xmlhttprequest object as a property of the window object. 
> But I also needed access to some other properties of my custom object 
> from the response handler, so I finally got around to sitting down 
> with your example and understanding it. The application is now working 
> as expected.
> 
> Thanks again!
> Rick
> -- 
> Rick Emery
> 
> "When once you have tasted flight, you will forever walk the Earth
> with your eyes turned skyward, for there you have been, and there
> you will always long to return"
> -- Leonardo Da Vinci
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 23 May 2006 12:30:38 -0400
>From: Rick Emery 
> Subject: Re: [Javascript] AJAX app causing excessive browser memory
> usage
> To: javascript at LaTech.edu
> Message-ID: <20060523123038.njm5b9mp7lxc4gws at www.emery.homelinux.net>
> Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
> format="flowed"
> 
> Quoting Matt Warden :
> 
>> Rick Emery wrote:
>>> I'm actually not creating a new one every 30 seconds; I create the xhr
>>> object when the page first loads, and reuse it every 30 seconds to send
>>> the request (and process the response).
>>
>> I would suggest not doing this. The object is meant to represent a
>> request, not a connection. At minimum, the object and all its request
>> and response content must remain in memory indefinitely rather than only
>> for x milliseconds while you do your processing. At worst, the designers
>> of the object assumed a short lifecycle and coded accordingly.
> 
> Changing this fixed the memory issues. Instead of creating one 
> xmlhttprequest object and using it for the life of the application, I 
> now create one when I need to make a request and destroy it after the 
> response is handled. For some reason that I don't understand, my 
> memory issues are gone and usage is steady for the life of the session.
> 
> Thanks!! (I'm not one for excessive use of puncuation, but felt like 
> this deserved more than one exclamation point :-)
> 
> Rick
> -- 
> Rick Emery
> 
> "When once you have tasted flight, you will forever walk the Earth
> with your eyes turned skyward, for there you have been, and there
> you will always long to return"
> -- Leonardo Da Vinci
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 
> End of Javascript Digest, Vol 39, Issue 21
> ******************************************
> 
> 
> 		
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or 
>less.
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 3:00:30 AM ET - 5/24/2006




More information about the Javascript mailing list