Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

index.html options

Status
Not open for further replies.

iancamarillo

Programmer
Sep 14, 2001
1
US
Can I have my index page open with nothing but the title bar and centered in the screen?

Thanks,
Ian
 
You can have whatever you want in your index page, mate.

Are you having a more specific problem in achieving this? Dean Owen
 
I believe he means that With no scrol bars and with it opened possibily in full resolution.

It is possible but requires some javascript.

---PASTE THIS IS THE HEAD TAG---

<script language=&quot;JAVASCRIPT&quot;>


<!--


function detectVersion()
{
version = parseInt(navigator.appVersion);
return version;
}

function detectOS()
{
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh';
} else {
OS = 'Windows';
}
return OS;
}

function detectBrowser()
{
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE';
} else {
browser = 'Netscape';
}
return browser;
}

function FullScreen(){

var adjWidth;
var adjHeight;

if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
adjWidth = 20;
adjHeight = 35;
}
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
adjWidth = 20;
adjHeight = 35;
winOptions = 'fullscreen=yes';
}
if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
adjWidth = 30;
adjHeight = 30;
}
if(detectVersion() < 4) {
self.location.href = 'oldbrowser.html';
} else {
var winWidth = screen.availWidth - adjWidth;
var winHeight = screen.availHeight - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var thewindow = window.open('thepageyouwanttoopen.html', 'Intranet', winSize);
thewindow.moveTo(0,0);
}
}

function MakeItSo(){
if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
window.open('thepageyouwanttoopen.html','windowname','fullscreen=yes');
} else {
onload=FullScreen();
}
}
// -->
</script>

---PASTE THIS FOR A LINK TO YOUR MAIN PAGE---

<A href=&quot;javascript://&quot; onClick=MakeItSo()>here</A>

------------------------------------------------------------------------------------
Make sure that you change the name of the page you want to open when the link is clicked this script will open the page in a FULL SCREEN if you want the screen to close, add a link to close the window.

----------------THIS IS A SOURCE TO CLOSE WINDOW--------------

<A HREF=&quot;#&quot; OnClick=&quot;window.close('fs')&quot;>close this window.</A>
---------------------------------------------------------------------------------------

hope all that helps some, its not EXACTLY what you want, but its at least an angle to shoot for.
--&quot;Hello Microsoft? Yeah this is Mike again.. now it says: &quot;Hit any key when ready...&quot; My question is: &quot;Where's the &quot;any key&quot;? Is my keyboard broken..?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top