Sorry for asking this here...
Is it possible to change the default header and footer of an internet explorer page with javascript?
Sorry for asking this here...
Is it possible to change the default header and footer of an internet explorer page with javascript?
The knack of flying is learning to throw yourself at the ground and miss.
Depends on what you mean. If this is your website, you could definately have divs defined that you could hide or show that would change an are of the page. If you want to do this the easy way, you should consider a server-side language like PHP and use includes.
Maybe it would be better if you defined what you're trying to accomplish?
I have an electronic form. Now when you print it, it usually gives you the normal header and footer "http:///......" and so forth.
I want to change that default header & footer wioth javascript.
We use a website built woth CGI, but we don't have the source to it.
So I'm basicly only allowd to use javascript
The knack of flying is learning to throw yourself at the ground and miss.
>>Now when you print it, it usually gives you the normal header and footer "http:///......" and so forth.
I don't get what you mean by this. Are you talking about the actual HTTP headers, or something that is printing out on the printer? If you want to change the address that is printed out on the bottom of the page, forget it. That's browser controlled and you can't change it.
Yup, that's what I want to do...I don't get what you mean by this. Are you talking about the actual HTTP headers, or something that is printing out on the printer? If you want to change the address that is printed out on the bottom of the page, forget it. That's browser controlled and you can't change it.
The knack of flying is learning to throw yourself at the ground and miss.
You can't. That is a function of the browser and its output to the printer, which you cannot control from Javascript. If you want this functionality, you have to write your own browser and make all your users use it.
You should be able to change the header using the <title> tag:
This is normally printed somewhere on the page.Code:<Title>My Home Page</Title>
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
I think he cared more about the footer than the header, but yes, that's true.
>>I think he cared more about the footer than the header, but yes, that's true.
Turn the paper upside down. < just a thought >
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
True yes, the footer is the most important, but i' wll also need to change the header...I think he cared more about the footer than the header, but yes
The knack of flying is learning to throw yourself at the ground and miss.
Well, as I said before, you cannot change the footer unless you redirect them to a URL that you like better than what is being spit out to the printer.
Well... then I guess thats that then
The knack of flying is learning to throw yourself at the ground and miss.
It Can be Done!
File->Page Setup allows you to change the header & footer.
You can do this programatically, but it's pretty hardcore! - http://support.microsoft.com/default...b;en-us;267240
Must be done with coding.File->Page Setup allows you to change the header & footer
Had a look at the code, It's quite hectic....
But the thing is, I must do it with javascript or something...
The knack of flying is learning to throw yourself at the ground and miss.
You might be able to get a reference to the IWebBrowser2 interface in JScript (In IE, Javascript is JScript) and call ExecWB on that...but from what I've seen on other boards that doesnt work.
You could port the code I gave you to an activeX dll and call that in JScript, but this would trigger a security prompt and the dll would need to be registered on each PC that used your page.
Lastly you could suss out the registry settings that IE reads to get the default Header & Footer and change them, but again youd need an activeX component to read the registry from JScript and youd run into security problems again.
So basically...with Javascript...not very likely!