CodeIgniter Forums
Generating a view AT the view level (Simple Print This Page) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Generating a view AT the view level (Simple Print This Page) (/showthread.php?tid=43167)



Generating a view AT the view level (Simple Print This Page) - El Forum - 07-02-2011

[eluser]Erocanti[/eluser]
I need a quick print this page solution until I have time to work on the css.

can a hidden input field containing the information that was passed onto that view be used to post the variables into another page?

Code:
<form method="POST" action="print.php">
<input type="hidden" name="vars"value="<? echo $rows; ?>" />
<button type="submit">Print</button>
&lt;/form&gt;

This is off the top of my head (a newb's head) so forgive me if its absurd in anyway.
As always, any input is appreciated.


Generating a view AT the view level (Simple Print This Page) - El Forum - 07-02-2011

[eluser]InsiteFX[/eluser]
Code:
&lt;form&gt;
&lt;input type="button" value="Print This Page"&gt;
&lt;/form&gt;

InsiteFX


Generating a view AT the view level (Simple Print This Page) - El Forum - 07-09-2011

[eluser]adityamenon[/eluser]
Quote:can a hidden input field containing the information that was passed onto that view be used to post the variables into another page?

Of course. It works for me all the time. I'm probably making some horrible mistake in architecture to need variables passed around so awkwardly, but it gets the really urgent job done...