How Do U Code A Printable Output Of A Part Of Your Page?
im trying to develop a website and im wondring how to make a connection with a printer and make a printable version of the page
View Complete Forum Thread with Replies
Related Forum Messages:
Printable Output
Is there a standard technique, in a PHP/MySQL Web Application, for users to be provided with printable-quality output - e.g. business invoices - created for them on the fly?...
View Replies !
Data On A Printable Page
what i'm trying to do is take data from a form on an html page and display the data on two pages that someone can print. I was having a little trouble attemping to do so with a .pdf. Any suggestions?
View Replies !
Question Inserting Part Of The Url On Php Code
i would like to have a url wich is half static half dynamic: (the static part would be "tablerest2.php?brand=") and the part after the equal would be dynamic right now i have an autopopulating optionbox, that, when you select an option from the box, the link where you go is calculated by this line PHP Code:
View Replies !
Page Loades Part Of The Page
the below code is kinda working but its only loading part of the page, when I do a page refresh the rest of the page loads. the part of the page that is not loading correctly is the bottom 1/2 which displays images. Code:
View Replies !
Caching A Part Of A Page?
I am working on a custom banner generator for some of our users. Its basically a flash banner that can take vars for colors etc, so users can integrate with their sites colour scheme. Its set up currently with the banner at the top as a preview, with e.g. .swf?color1=00000&color2=45efef in the object and embed tags. Below this is a script that is 3 nested for loops, that increment a var each and convert that to hexidecimal. The three hex refs are then concat'd together, and set as a CSS background to a transparent gif with an href around that calls the same page with the new colors in the url, which get passed back to the flash movie. (hope im making sense here :)) So theres about 500 or so (im incrementing the vars by two,otherwise its way sloooow) <a><img></a> that have to be generated on each page load. Im wondering how and if i can speed this up?
View Replies !
Getting Part Of Another HTML Page
I'd like some help with writing a script that grabs part of another HTML page. For example : I want to grab the content of a HTML page that contains the following strings : <!-- begin --> and <!-- end --> Then I want to get all the content (including these two tags) that is in between the two tags.
View Replies !
Refreshing Part Of A Page
Can some one help me if it is possible to refresh a part of a page, without reloading the whole page. Let's say, i want to add a small message box to my webpage. After writing a message, the user presses the send button and i want only this part of the page to refresh and give him a status message saying his message was successfully received.
View Replies !
How To Let Php Reflesh Part Of Page
I want to write some code that when some variable condition is met, it will change a table cell value (only reflesh that value instead of the whole page), I used to think it as calling JavaScript function first, which in turn change that table cell value in the page. But I don't know how to let php call JavaScript, or mimic click button action to call JavaScript.
View Replies !
Selective Rendering Of Part Of A Page
I want to skip the rendering of certain parts of a Web page if the user doesn't have a certain permission (e.g. a cookie). I'd like to do it along these lines: <p>Anybody can see this paragraph.</p> <? start_protected_section($got_permission); ?> <p>Not everybody can see this paragraph.</p> <? end_protected_section(); ?> Is it possible to disable the rendering of a section outside the code like this (perhaps by setting a PHP flag to redirect subsequent output)? I don't really want to complicate things by moving part of the page into a separate "include file" or mixing the HTML and PHP by using a here-document (the <<<END syntax).
View Replies !
Include Specific Part Of Page
i know that the include() function allows you to include a page with php but how do i only include PART of a page like specific tables? what im trying to do is get the certain parts of this page: ...
View Replies !
Need To Copy Text From One Part Of Page To Another
It has been great so far but I hit a road block on one thing and I figured the brilliant minds here could help. This site isn't in a database because its 3000 pages of HTML now and we figured we can do work arounds to make it look right. We are starting a database for future data though Code:
View Replies !
Extract Each Part Of A Page That Are Enclosed In A <b>-tag
I would like to extract each part of a page that are enclosed in a <b>-tag, but ONLY if there are no other tags enclosed. <b>some text</b> <-- a match <b>some text <i>in italic </i></b> <-- should NOT match This is what I have so far: $pattern = "/<b>(.*?)</b>/si"; preg_match_all($pattern, "<b>some text <i>in italic </i></b>", $out); Any thoughts?
View Replies !
Change Part Of A Web Page After X Seconds Delay?
I was asking about how to pass a new array number with a page refresh and someone responded: But what I don't understand is why you want to change images like that on page reload, I have never seen it before. That raised the question to me - if I have written out a web page in PHP that has an image displayed on the page - is there a way to have it change the image every 10 seconds? Could you do this with a For Each or While type loop? I thought once the script was parsed it then wrote the page source and it doesn't change on the screen.
View Replies !
Code Output
I am trying to make a table which displays links if the record has a file that can be downloaded but the code I have is wrong. Just wondering how to fix it? Code:
View Replies !
When I Run My Code-output Is Blank?
i have written this code where i get teh xml file from ups servers,parse it and then insert the values in Database from the xml array which i get along the way.But when i run the code... i get a blank screen...it doesnt attempt to contact server...dont know what is must be wrong.looks like its not initiating the init fucntion.any ideas? here is the code:
View Replies !
Output Html Code
I have this image code inside my db <img src="images/dir_48.jpg" width="119" height="114" alt=""> now when I select it and echo it out it justs shows up like that in the browser.
View Replies !
How To Output Code From A Html Textarea
Iv made a mysql table and PHP files wich can Add, Edit, View and Delete text and data from the mysql table. The problem is that when I try to view php scripts from the mysql table from web the php code is shown as html text, and the PHP tags are removed. For example I would like to view PHP code with the show_source on my webpages. How do I do that? Code:
View Replies !
My Code Isn't Generating The Correct Output
i have a database that has a primary key. i'm sorting all the results descending from the database and displaying them along with a button to delete the entry from the database. the button links to remove.php?Id=XXXXXXX i have the button set so that it displays the unique id munber on the button (for troubleshooting) the numbers on the buttons are correct according to my database, but when i click on, say, 43, it links to "remove.php?Id=40" instead of "remove.php?Id=43" can someone please tell me what i might be doing wrong? Code:
View Replies !
Code Snipped To Output Database Schema...
I thought this might be handy for others at some point, so here it is... a bit of code to output all the table names, field names and datatypes from a MySQL database. I just had to do it for some documentation, and didn't fancy writing it all down longhand... $t_result = mysql_query("SHOW tables"); if ($t_result!=false){ while ($t_row =@ mysql_fetch_array($t_result)){ $table = $t_row[0]; print $table." "; $c_result = mysql_query("SHOW columns FROM ".$table); if ($c_result!=false){ while ($c_row =@ mysql_fetch_array($c_result)){ print $c_row[0].chr(9).$c_row[1]." "; } } print " "; } }
View Replies !
How To Remove (replace) Carriage Returns In Output Code..
Let's say I have a line of code in a MySQL table as following: This is some text in a database table with a carriage return in the middle of it! Now, if I grab that code and echo it, the text will show up in the browser with no line break, which is fine. HOWEVER, if you look at the page source for that code, there is still the carriage return in the middle of the line. My question is, how can I remove that carriage return from the text in the source code.
View Replies !
Php Function To Read Local Python Script Output, Not Code
On my server python has to run in the wwwroot/cgi-bin folder, but php can run anywhere. My site is going to be written in python but I don’t want my user to see the url as mysite/cgi-bin/... . So for example my homepage, index.php should contain a simple php script that will get my python page from the cgi-bin directory and display it. However when I try to use SSI or fopen/file_get_contents/readlink and commands like these it just displays the python code. Where as when I visit the python page in my browser it runs it and displays the output for me. My question is what php function can I use to execute my python page and return the output, not the code itself. (I think my hosting provider has disallowed certain powerful commands like system() etc. Does this make it impossible?). As the very least can’t my php script pretend to be a www user and ‘visit’ the python page to read the output?
View Replies !
Printable PDF
i have been given an assignment, where i need to construct a php system, that generates a 10 pages report, containing some misc numbers so therefore, i need a system, that puts my stuff "down on paper", or in other words, generates a .pdf file..
View Replies !
Printable Pages
I am interested in making a page printer friendly. What units should I use and are they going to be affected by different screen resolutions?
View Replies !
Quoted Printable
I am attempting to make a pop3 mail client. When it downloads mails from the server, it passes them through the decode function of the pear mail_mime class (http://pear.php.net/package/Mail_Mime) in order to convert it into readable format. It does this except special characters don't show (e.g. £). I belive this is due to the "Content-Transfer-Encoding: quoted-printable" in the mail. I.e. it's coded with quoted-printable. I have tried a multitude of functions on the initial mail before passing it into the function and also on the output of the function to no avail.
View Replies !
Need Output On Same Page?
I was using a header.php before which had on it the search box. The search submit button called the sitesearch.php file and displayed the results. The header.php was included and was always shown...That worked great... I know have decided that i want the search box on the top of my index page and would like the results to display on the same page without using or calling another page. I want the search box on the right in it's own cell and the results to display on the left portion of the screen...
View Replies !
Web Page Output.
I am trying to output a large cell from a table in mysql but it seems I am only limited to outputting with scroll bars on the page. Is there a better way to post a large cell to the web than with scoll bars? Can I minmize them at least.
View Replies !
Quoted Printable Encoding In PHP
I need a function which will encode my message sender and subject, which is in UTF-8 or in Windows-1250 (I have 2 different types of messages - bulgarian and polish). I tried base64_encode, but the code wasn't always decoded correctly by the email clients, so i think i need quoted-printable encoding. I also found imap_8bit or mb_encode_ functions, but I somehow cant get the extenstions to work. So please suggest a different function for the encoding, or a way how to get php5 to work with the 2 mentioned functions. (I tried the manual that is on http://php.net/manual/en/ref.mbstring.php but it didnt work / I dont know what exactly to add to php.ini).
View Replies !
Generating Printable Content
PHP and its various other attachable components are proving to be some of the most revolutionary, as well as, invaluable tools for web-based applications. However, somewhere along the line of development with PHP a critical component was left out. Most packaged database/scripting languages that PHP is in competition with all have some sort of reports generating component. NET + Crystal Reports. Oracle + Designer 10, and various others along for the ride. The whole reason for ever writing an ERP-type application is to retrieve data and formulate through REPORTS into information to benefit the user/company.
View Replies !
PRINTABLE Tables - & MySQL
Here's the current scenario - I have several related tables in a MySQL database. I have written a (very basic) PHP/HTML front end that pulls various related information together and displays a large (okay, medium) table of information, with column headers, etc. The problem now is that our clients would like to be able to print out these tables and have them come out with the table headers at the top of each page, etc. If we were talking about a Word or Excel document, that would be simple. But in a webpage? My first thought was to have the headers repeat after every so many rows (ie. after every 20 rows), but there is a distinct possibility of any given row being taller than expected, thus pushing the next rows down further than expected and eventually offsetting the headers on subsequent pages.
View Replies !
Using PHP To Show Printable Site Layout.
I have 2 styles sheets in my page one for screen and one print, and my page displays the correct print syles when i do a print preview from the browser. Fine... However I was browsing some php sites and I noticed that they have a print link that when clicked displays the page using the print stylesheet. I am trying to figure this out and wondering if the correct or most appropiate way of doing this is passing a varaible e.g print=true via GET and using that to determin what stylesheet to use.
View Replies !
PDFlib - Printable Pages In Pfd Format
I found out I was going to set up one of my web-pages so that it could generate not only printable pages, but printable pages in pfd format. (easy to save, etc etc) so, today I contacted the guys whom host my server, and they installed PDFlib for me. Code:
View Replies !
Creating A Printable Report Simply, Rtf Or PDF
Over Christmas I produced, using PHP and MySQL, a database and front end to record my familys family tree with a short biography and linked photos and locations if desired. All this works fairly well. However, as a followup I'd like to create a report this data as a report (or booklet) in printed format. The simplest and probably least satisfactory way is to format it in very simple HTML and import it into the word processor of choice. Better ways I assume are to export it in PDF or RTF. I am veering toward RTF. PDF - pros: Probably the neatest solution from a user point of view. PDF - cons: PHP was not compliled on my Slackware 10.0 linux system with the pdf functions working. My parents are running XP home, I doubt if phpdev5 (beta) has the same pdf functions compliled in. Basically I don't want to go through the rigmarole of recompiling php on two dissimilar systems. I could generate XLS-FO directly, then use FOP to generate PDF. I would probably spend a lot of time getting this to work under two separate systems, and have to get java working on XP. Hastle if I am not all that familiar with java. I could create a DTD, get my script to produce XML and then use a template and something like sablotron to generate XML. That seems like a sledgehammer to crack a nut. Also, I must be getting the wrong end of the stick with XML, as last time I tried it created far far more work than it saved. Saving effort seems to be a large point of XML. RTF - pros: Since this is basically one step from hand coding, using my script to directly generate rtf is relatively self contained and therefore not dependent on successfully installing a lot of other stuff. RTF - cons: I've still not managed to add images to RTF. RTF is horrid, wrt to human readability of what my scripts are generating, making debugging rather nasty. Even if it works now in open office and word I have no way of knowing I have not created broken RTF that future word processors might balk at.
View Replies !
Displaying A Printable Color Square
I have a form that allows the user to configure some properties of an item. One of the properties is the color scheme. So, if they selected green and red (they have a choice of 64 colors), at the end I wanted to present them with a summary of their configuration and wanted to show their selected colors as small colored squares. I am using php to create the resulting summary page. The problem is if I use tables or CSS to create this square, by defualt, it is not printable since it is taken as a background color. I heard that I can create an image on the fly and color it using ImageMagick or GD libraries. Can you please tell me how to go about this? I sthere any PHP library my ISP needs to install or can I just call some already-there functions to do this?
View Replies !
Generating Multiple Output On One Page
I'm building a website in PHP and Javascript. The registration portion is divided into 2 sections: 1. In one, I get info about the visitor. This is sent via POST to a php script which is section 2. 2. In the second section, I get some specific information about their pets and make suggestions. I'm having problems with section 2, and I hope y'all can help. The core of the PHP script in Section 2 consists of the following: <?php for ($n=1; $n <= $num; $n++) { print "Please enter age of pet #$n:" ; print "<INPUT type='text' name='petage'     " ; $div = $n . "ajaxDiv" . ";"; $_ENV['div'] = $div; print "DIV IS: $div<br><br>"; print "<INPUT TYPE='button' onClick='ajaxFunction()' NAME='$age' VALUE='Done!'>" ; print "<INPUT TYPE='reset' NAME='Clear' VALUE='Reset form'> <br><br>" ; print "<div id='$div'></div><br><br>" ; } ajaxfunction() looks like: if(ajaxRequest.readyState == 4){ var div = "<?php echo $_ENV['div']; ?>"; if (div = "") { div = "1ajaxDiv"; } var ajaxDisplay = document.getElementById('div'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } // Get pet stores based on zipcode var zipcode = "<?php echo $zip; ?>" var querystring = "?zipcode=" + zipcode; ajaxRequest.open("GET", "getstores.php" + querystring, true); ajaxRequest.send(null); The idea is that the user fills in the age of their pet, I look in my DB and spew out the names and addresses of vets and pet stores in the area. Thanks to ajaxfunction(), I can do this through: print "<INPUT TYPE='button' onClick='ajaxFunction()' NAME='$age' VALUE='Done!'>" ; The function calls another PHP script and outputs the data in the same HTML file. So here is my issue. This code works fine when there is only one pet. If there are more than one, then clicking on the second button results in no output at all. I was thinking of enclosing it in a form like so: <form method="post" action="/cgi-bin/samescript.php"> loop to output buttons </form> Meaning call the same script after clicking the first button, second button and so on. But I would then need to change: print "<INPUT TYPE='button' onClick='ajaxFunction()' NAME='$age' VALUE='Done!'>" ;
View Replies !
Processing And Page Output Order
I have been using php for some time now and have got the hang of fairly high level processing including dynamic images from mysql output that leads me to the point of needing to better understand the processing /logic order of the php engine so i can increase the speed of my scripts. Code:
View Replies !
Output Page As Script Is Running
How can I get my php script to output to the browser before it is done executing? I am running a perl script in the middle of my php script and I would like for the information like "Working..." to be displayed as the perl script is running.
View Replies !
Page Refresh + Incremental Output
IS there a way to say make a page output a number then sleep for a certain number of seconds... then refresh and display number+1 and so forth so a set number of times? for ($i=1;$i<=60;$1++) { echo $i; sleep(5); } but all it does is sleep forever, then at the very end dumps each echo all at once.
View Replies !
|