WebSite X5Help Center

 
Aleksej H.
Aleksej H.
Moderator

Print part of the blog post page  en

Autor: Aleksej H.
Visitado 2251, Seguidores 3, Compartilhado 0  

HelloI need to print part of the blog page.I am using this instruction. The problem is that the text inside the DIV is "not visible" for printing (an example in the picture).

If I write this way:

<div id="print-content">Test...</div>

That all works.

But if I write that way:

<div id="print-content">

Test...

</div>

A blank page is displayed for print (only with URL address and date). Example (with empty print page).

Please help solve the situation. Thank you very much for the answer.

Publicado em
14 RESPOSTAS - 3 ÚTEIS - 1 CORRIGIR
Aleksej H.
Aleksej H.
Moderator
Autor

WebSite X5 Professional 16.2.1

Ler mais
Publicado em de Aleksej H.
Giorgio C.
Giorgio C.
User

Ogni riga di testo viene inserita tra i tag <div></<div> fino al ritorno a capo.
Quindi le istruzioni html che comprendono dei ritorno a capo non funzionano.

ciao

google:

Each line of text is inserted between the <div> </ <div> tags until the carriage return.
So html statements that include word wrap do not work.
 

ciao.

     

       

Ler mais
Publicado em de Giorgio C.
Aleksej H.
Aleksej H.
Moderator
Autor

What can I do to solve this problem?

Ler mais
Publicado em de Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Aleksej H.
What can I do to solve this problem?

(IT - EN)
1) - with "Ctrl + U" find the name "ID" of the selector / object to be printed on the page;
2) - in the EXPERT section, paste the JS code in HEAD:
<script> function printContent(ID){
var creaPagina = document.body.innerHTML;
var printContent = document.getElementById(ID).innerHTML;
document.body.innerHTML = printContent;
window.print();
document.body.innerHTML = creaPagina;
</script>
3) - for the LINK "type" use the HTML code:
<a href="javascript:void(0)" onClick="printContent('imCel1_01_Cont')">Print 1</a>

>> example ... (Ctrl + U ... to see the code used)
.
Hello - ciao

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autor

Thank you for trying to help.But these options also do not work.frownExample.

Ler mais
Publicado em de Aleksej H.
Aleksej H.
Aleksej H.
Moderator
Autor

Foto

Ler mais
Publicado em de Aleksej H.
Incomedia
Stefano G.
Incomedia

Hi Aleksej,

If I understood the issue correctly, I'm afraid this mostly has to do with custom code, for which unfortunately the Staff cannot provide support for.

Although, seeing that users already intervened to help you on this matter, I will gladly leave the topic open so that you might receive the support you need from other users eventually.

Let me know if I can help you with anything else

Thank you

Stefano

Ler mais
Publicado em de Stefano G.
Aleksej H.
Aleksej H.
Moderator
Autor

"If I understood the issue correctly, I'm afraid this mostly has to do with custom code, for which unfortunately the Staff cannot provide support for." - Yes, I understand that.

"Although, seeing that users already intervened to help you on this matter, I will gladly leave the topic open so that you might receive the support you need from other users eventually." - Thank you.

Ler mais
Publicado em de Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Aleksej H.
Thank you for trying to help.But these options also do not work.Example.

(IT-EN) Hello, unfortunately I do not have the program to check;
... in the code I see this error [<div id="prin"></span></div></div><div...etc.], perhaps generated for the formatting that is activated automatically;
try to do this test:
paste all this string without a carriage return, and check what happened:
<a href="javascript:void(0)" onClick="printContent('prin')" style="position:absolute;font-size:22px;right:0px">Print 1</a><br><br></span></p><p id="prin" style="font-size:22px;text-align:left">1 - Lorem ipsum dolor sit amet, <br>consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p><p><span>
.
Hello  - Ciao

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
Claudio D.
Claudio D.
Moderator
Usuário do mês IT

se ho capito ...

io ho provato il codice che ti ha gentilmente rilasciato KolAsim () sugli articoli del Blog e funziona benissimo...

qui la mia prova

if I understood correctly

I have tried the code that has kindly released you KolAsim on the Blog articles and it works very well ...

here my test

http://pcuty.altervista.org/16x/blog/index.php?terzo-articolo

Ler mais
Publicado em de Claudio D.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... grande! Claudio  ... grazie per il test! ... smile ... ... ciao...wink

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autor

Thanks, it helped.

Ler mais
Publicado em de Aleksej H.