This topic is locked
[SOLVED]

 PRINT VIEW_PAGE

7/12/2011 1:45:21 AM
PHPRunner General questions
F
futo author

hello,
i have added print button on view_page, which is present on scren and I don't want to be printed... also is for butons "Back on the list" and "Next" and "Previous" (<< ; >>)
Any help please
Tomo

Sergey Kornilov admin 7/12/2011

Add a new section to CSS style declaration using Visual Editor in HTML mode:

@media print {

.noPrint {

display:none;

}

}


Then add class='noprint' in your HTML that you don't want to appear in the printed version, such as your button.

<span class='noprint'>...</span>


More info:

http://stackoverflow.com/questions/355313/how-do-i-hide-an-element-when-printing-a-web-page

F
futo author 7/12/2011

[quote name='admin' date='12 July 2011 - 09:04 AM' timestamp='1310457859' post='59389']

Add a new section to CSS style declaration using Visual Editor in HTML mode:

@media print {

.noPrint {

display:none;

}

}


Then add class='noprint' in your HTML that you don't want to appear in the printed version, such as your button.

<span class='noprint'>...</span>


Yes... but I allready have class for those button like this:

<INPUT id=Fakt_print class=button value=ISPIS type=button typeid="ib">
when I delete clas='button' and write class=noprint than I must refresh page so that print button can be in use again

C
cgphp 7/12/2011

You can use multiple classes for an element by separating them with a space in the class attribute:

<INPUT id=Fakt_print class="button noPrint" value=ISPIS type=button typeid="ib">
F
futo author 7/12/2011



You can use multiple classes for an element by separating them with a space in the class attribute:

<INPUT id=Fakt_print class="button noPrint" value=ISPIS type=button typeid="ib">




WORKS GREAT
BUT.... ONLY...
I must refresh browser page so that I can use print button again..... without leaving same page
Thanks Dude

C
cgphp 7/12/2011

Do you use some custom code in the "Client" option of the button ?

F
futo author 7/12/2011



Do you use some custom code in the "Client" option of the button ?


yes, by default when button is inserted, in the Client option

is written this:

// Put your code here.

var message = result["txt"] + " !!!";

ctrl.setMessage(message);

C
cgphp 7/12/2011

Sorry, what's inside "Client Before" ?

F
futo author 7/12/2011



Sorry, what's inside "Client Before" ?


this
// Put your code here.

if (window.print)

window.print();

// Uncomment the following line to prevent execution of "Server" and "Client After" events.

// return;

C
cgphp 7/12/2011

Try the following code. The if statement is not necessary.

ctrl.setEnabled();

window.print();
F
futo author 7/12/2011



Try the following code. The if statement is not necessary.

ctrl.setEnabled();

window.print();




same thing...

don't work

C
cgphp 7/12/2011

Check under the View page events if you have more than one instance of the same button. If so, remove it.

F
futo author 7/12/2011



Check under the View page events if you have more than one instance of the same button. If so, remove it.


thanks..

this is not so important..... i'l set this another time....
thanks again
tomo

F
futo author 7/12/2011



thanks..

this is not so important..... i'l set this another time....
thanks again
tomo



****everything works fine... problem was with Internet Explorer 8. **
Thanks