Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
That's wierd. Just tried again scotty. Checked js function only contains
window.print();
and nowt else. And it prints headers/footers. I wonder if you happen to have blank values in the registry? That's where it gets the defaults from apparently.
PS
That does seem to be it. Opened any old page in IE, selected page setup, cleared header and footer strings, closed and tried window.print() again - no hdrs/ftrs. Not really a viable solution unfortunately.
PPS
From VB supposed to be able to use iWebBrowser2.exewb with third param containing necessary info. But how to put a iWebBrowser2 object in the project I have no idea. It's defined in same dll/oca asWebBrowser so should be available in controls.
oops. sorry zog. can't do that from clientside script at the moment without that clunky tech you mentioned - templates. however, there is a freeb activex control you can use which easily does the job...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
html
head
script language="Javascript"!--
function doprint() {
//save existing user's info
var h = factory.printing.header;
var f = factory.printing.footer;
//hide the button
document.all("printbtn").style.visibility = 'hidden';
//set header and footer to blank
factory.printing.header = "";
factory.printing.footer = "";
//print page without prompt
factory.DoPrint(false);
//restore user's info
factory.printing.header = h;
factory.printing.footer = f;
//show the print button
document.all("printbtn").style.visibility = 'visible';
}
//--/script
/head
body
my test page.
object id=factory style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" viewastext
codebase="www.meadroid.com/scriptx/...6,1,431,8"
/object
brbr
div id="printbtn"input name=idPrint type=button value="Print the letter"
onclick="doprint()"/div
/body
/html
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
try that - i've stripped out all the html tagends.
That looks good. Ta SP. Seen mention of scriptx but not a decent example of use. Will investigate tomorrow. Looking at this problem all day and my brain hurts. Time for vodka.
Thursday
That works a treat! Thanks very much sp! for yet another bit of good advice.
Comment