View Full Version : Dynamic Ajax Content - Print option

05-08-2006, 05:42 PM

With Dynamic Ajax Content what kind of print fonction can I use to print only the content without the whole page (buttons and top).


05-08-2006, 05:55 PM
So... you want to get part of the page you are calling with AJAX?

What you need is javascript that will split the data at certain points.
The best/easiest way would be to redesign the page you are calling.
The other option is to find specific UNCHANGING markers you can take the data "from here" and "to here".

Someone else will have to help with that specific code, though.

05-08-2006, 06:29 PM

The thing is, if I put a print button it's will print the whole page with the menu and the top (kept the css).

If I put a button that open the page (only the content) in a new windows,
the css is not taken.


05-08-2006, 07:52 PM
Oh. Ok. You mean print, like a print, not print like "print" (display) a line of code.

Actually, it's fairly similar. You still need to identify what part will be used.

Firstly, the AJAX has nothing to do with it, really.

What you need is to setup an alternate document for printing either via the (said-to-be-incompatible/unworking) script here or with just a "click this link to print".

By default the entire document is printed. You need a NEW document for printing.