Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
146
rated 0 times [  150] [ 4]  / answers: 1 / hits: 34931  / 10 Years ago, wed, july 9, 2014, 12:00:00

I have print option in my application. When user click on print button the print page should be open in another tab/window.



Again I am sending some parameters with print page as it contain dynamic values.



to do so i have used php header as



header(location:Delivery_form.php?cnno=$cnno&copies='$nocopy');


but it is redirecting in parent page. and javascript window.open as



echo <script type=text/javascript>.
window.open('Delivery_form.php?cnno='.$cnno.&copies=.$nocopy ).
</script>;


please help me to achieve this funcnality.


More From » php

 Answers
37

The php header should be :



header(location:Delivery_form.php?cnno=.$cnno.&copies=.$nocopy);


Script



echo <script type=text/javascript>
window.open('Delivery_form.php?cnno=.$cnno.&copies=.$nocopy.', '_blank')
</script>;

[#70266] Monday, July 7, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
faithemilys

Total Points: 418
Total Questions: 100
Total Answers: 114

Location: North Korea
Member since Fri, Nov 4, 2022
2 Years ago
faithemilys questions
Wed, Mar 31, 21, 00:00, 3 Years ago
Thu, Oct 15, 20, 00:00, 4 Years ago
Tue, Sep 22, 20, 00:00, 4 Years ago
Sun, Feb 9, 20, 00:00, 4 Years ago
Fri, Dec 6, 19, 00:00, 5 Years ago
;