₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,779 members, 8,432,572 topics. Date: Tuesday, 23 June 2026 at 10:15 PM

Toggle theme

Ogzille's Posts

Nairaland ForumOgzille's ProfileOgzille's Posts

1 2 3 4 5 6 7 8 ... 31 32 33 34 35 (of 35 pages)

ProgrammingRe: How To Code The Printing Of A Particular/desire Space On A Web Page by ogzille(m): 7:58pm On Nov 18, 2009
You can use the stylesheet solution as the previous guy mentioned, but if u must have a button then use this:

Add an iframe to the page, set the size to the minimum possible size or set display to none.
On the onclick event of the print button add this function

function printDiv(pd, frame)
{
var copyto = document.getElementById(frame);
var content = document.getElementById(pd).innerHTML;
var doc = (copyto.contentWindow || copyto.contentDocument);
if (doc.document) { doc = doc.document; }
doc.write("<head><title>your page title</title></head><body onload='this.focus(); this.print();'>" + content + "</body>"wink;
doc.close();
}


argument 1: pd is the id of the element u want to print its content and frame is the id of the iframe. You can change he values to suit.


Hope it helps.
ProgrammingRe: Document Viewer Web Application Developer Needed by ogzille(m): 8:02pm On Nov 17, 2009
If you want to get the job done call 07066839654
WebmastersRe: Chat Rooms And Forum Enabled On Site by ogzille(m): 9:15pm On Sep 15, 2009
i can create an efficient ajax driven chat 4 u, drop a reply 4 m if interested
ProgrammingRe: Need To Get The Right Algorithm by ogzille(m): 8:46pm On Sep 15, 2009
i think u should run a loop and check d textboxes for content using d normal if statement.
which alng are u using?
Tech JobsRe: I Need A Php Programmer: I Have A Job For You by ogzille(m): 12:18pm On Aug 29, 2009
I am a good PHP/MySQL programmer and have done some good jobs. U can reach me on 07066839654 for further discussions.
WebmastersRe: Need To Upload Image by ogzille(m): 7:06pm On Aug 25, 2009
this should b ur server side script
$file="company_logo/".$rand.basename($_FILES["logo"]["name"]);
move_uploaded_file($_FILES["logo"]["tmp_name"],$file);

logo is the name of ur browse button, $file is what u store in ur db, company_logo is the folder u are uploading to.
Hope it helps

1 2 3 4 5 6 7 8 ... 31 32 33 34 35 (of 35 pages)