PDA

View Full Version : HELP --- I need help FAST --- website needed by tommorow



CMMVideos
11-21-2005, 12:52 AM
I have a window that is chormeless (i got it from....http://www.dynamicdrive.com/dynamicindex8/chromeless.htm) and i want to put a button (like the ones that you use for the submit button on forms) and i want to make it close out the chromeless window.....

PLEASE HELP I NEED THIS DONE BY TOMMOROW!!!!

THANKS ALOT!!!!!
:) :D

jscheuer1
11-21-2005, 02:19 AM
<input type="button" value="Close Window" onclick="self.close();">

This only works if the window was launched with javascript. I believe the chromeless window qualifies under that rule.

CMMVideos
11-21-2005, 10:02 AM
Thanks i will try that

CMMVideos
11-21-2005, 10:14 AM
Ok i tried that and it didn't work....
i am using this code



<script language="javascript" type="text/javascript" src="chromeless_35.js"></script>
<script language="javascript">

/*
Chromeless Window (v3.5)- By Gabriel Suchowolski (this credit MUST stay intact)
Author site at http://www.microbians.com
Visit http://www.dynamicdrive.com for this script
*/

//For paramater explanations, see accompanying faq.htm file
function openIT(u,W,H,X,Y,n,b,x,m,r) {
var cU ='close.gif' //gif for close on normal state.
var cO ='close.gif' //gif for close on mouseover.
var cL ='clock.gif' //gif for loading indicator.
var mU ='minimize.gif' //gif for minimize to taskbar on normal state.
var mO ='minimize.gif' //gif for minimize to taskbar on mouseover.
var xU ='max.gif' //gif for maximize normal state.
var xO ='max.gif' //gif for maximize on mouseover.
var rU ='restore.gif' //gif for minimize on normal state.
var rO ='restore.gif' //gif for minimize on mouseover.
var tH ='<font face=verdana size=2>Chromeless Window</font>' //title for the title bar in html format.
var tW ='Chromeless Window' //title for the task bar of Windows.
var wB ='#D5D5FF' //Border color.
var wBs ='#D5D5FF' //Border color on window drag.
var wBG ='#D5D5FF' //Background of the title bar.
var wBGs='#D5D5FF' //Background of the title bar on window drag.
var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0' //Html parameters for Netscape.
var fSO ='scrolling=auto noresize' //Html parameters for main content frame.
var brd =b||5; //Extra border size.
var max =x||false; //Maxzimize option (true|false).
var min =m||false; //Minimize to taskbar option (true|false).
var res =r||false; //Resizable window (true|false).
var tsz =20; //Height of title bar.
return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}

</script>
<p><a href="#" onclick="mywin001=openIT('http://www.google.com',600,400,null,null,'mywin001',5,true,true,true);return false">
Open Google.com</a>

<p><a href="#" onclick="mywin002=openIT('http://www.dynamicdrive.com/faqs.htm',550,600,null,null,'mywin002',5,false,false,true,'#FF8000','#FFC184');return false">
Dynamic Drive FAQs</a>


and js in the the attached file

i need to make that whole window close and i tried using the following code


<input type="button" value="Close Window" onclick="self.close();window.self.close();window.close()">

to close it and it doesn't do what i want it to please help

jscheuer1
11-21-2005, 10:49 AM
I set up a demo here and checked the code it uses to close itself when you hit the x on the close button for it. This tested out just fine here:


<input type="button" value="Close Window" onclick="top.window.close();">

You put that on your page which is showing through the chromeless window.

You do know that this chromeless window is useless on the web, don't you?

CMMVideos
11-21-2005, 11:05 AM
click where for the demo?

CMMVideos
11-21-2005, 11:06 AM
:) :) nevermind thanks a BUNCH it works! :) :)

jscheuer1
11-21-2005, 11:09 AM
There is no real way to do a demo of this script on the web, mine was only a local demo, anyway. Use this:


<input type="button" value="Close Window" onclick="top.window.close();">

on the page you launch in the chromeless window, it will close the chromeless window.

jscheuer1
11-21-2005, 10:10 PM
I doubt you can do that. There may be security issues involved. One thing you can try is (worked in an address bar trial here):


<input type="button" value="Close Window" onclick="top.window.parent.opener=self;top.window.parent.close();">

I really think this whole idea is poorly thought out though. Don't you see how, on the web, the chromeless window isn't really chromeless but, inside another window? Also, in other browsers, a simple pop-up is created instead. The code I originally gave you works in FF to close this simple pop-up but, changing it to work in IE causes FF to no longer close. I'd suggest using a regular pop-up as can be made using this wizard (http://dynamicdrive.com/dynamicindex8/popwin.htm).

CMMVideos
11-21-2005, 11:02 PM
I know what the chromless window is and i wanted it just for visitors in internet explorer, i will try that code and see if it works

jscheuer1
11-21-2005, 11:12 PM
If you are determined to do this, and if my new code works, you should do a browser test:


<input type="button" value="Close Window" onclick="if(document.body.filters){top.window.parent.opener=self;top.window.parent.close();}else {top.window.close();}">

CMMVideos
11-21-2005, 11:34 PM
thanks you have been a big help i will try this later.... thanks

CMMVideos
11-21-2005, 11:35 PM
do you need my webstie anymore because i want to remove it from this post if i can

CMMVideos
11-21-2005, 11:44 PM
nope, i tried both of the codes and they both dont work (the code before and the code you just gave me)

THANKS FOR YOUR HELP

CMMVideos
11-21-2005, 11:49 PM
i think this might make it easier....is there a way to display something in a website but make it disapper when its in an chromless window? because i want the logout button to work for both chromless and fullscreen windows, but i only want that because i dont want visitors to be clicking on close window and it not closing out of the chromless window....

jscheuer1
11-22-2005, 03:15 AM
i think this might make it easier....is there a way to display something in a website but make it disapper when its in an chromless window? because i want the logout button to work for both chromless and fullscreen windows, but i only want that because i dont want visitors to be clicking on close window and it not closing out of the chromless window....


If I understand that right, this will do that, place it where you want the button to be:


<script type="text/javascript">
if(!document.body.filters)
document.write('<input type="button" value="Close Window" onclick="top.window.close();">')
</script>

IE users will see nothing, other browsers will see the close window button and it will work for them.

A few things you might try as an onclick event for the button on the chromeless window for IE are:

opener.mywin001.close();

and

opener.opener.mywin001.close();

and

opener.opener.opener.mywin001.close();

and

top.window.opener.mywin001.close();

and

top.window.parent.opener.mywin001.close();

and

parent.opener.mywin001.close();

where 'mywin001' is the variable name you assigned (as in the demo) to the chromeless window when you opened it.

CMMVideos
11-22-2005, 08:41 PM
today during school i though about doing the same thing (using mywin001 in the script) but i will try all your sugestions.....thanks a lot!


PS. Do you need they website anymore?

CMMVideos
11-22-2005, 11:58 PM
so far i tried the code you said about making it appear only in the fullscreen window, but it's not working .... the two script i am working with are from http://dynamicdrive.com/dynamicindex8/window1.htm and http://dynamicdrive.com/dynamicindex8/window1.htm

i want the fullscreen one to show the logout button but not the chromless one


Thanks, I'll try the others 2

CMMVideos
11-23-2005, 09:54 PM
does anyone know that answer?

jscheuer1
11-24-2005, 04:43 AM
so far i tried the code you said about making it appear only in the fullscreen window, but it's not working .... the two script i am working with are from http://dynamicdrive.com/dynamicindex8/window1.htm and http://dynamicdrive.com/dynamicindex8/window1.htm

i want the fullscreen one to show the logout button but not the chromless one


Thanks, I'll try the others 2

You've lost me, those (see above quoted) are the same two scripts.

CMMVideos
11-24-2005, 12:14 PM
so far i tried the code you said about making it appear only in the fullscreen window, but it's not working .... the two script i am working with are from http://dynamicdrive.com/dynamicindex8/chromeless.htm and http://dynamicdrive.com/dynamicindex8/window1.htm

i want the fullscreen one to show the logout button but not the chromless one


Thanks, I'll try the others 2


sorry the above is now right

CMMVideos
11-26-2005, 02:59 AM
any one got any ideas?

jscheuer1
11-26-2005, 05:08 AM
Since you've removed the link to your demo, at least as far as I can tell glancing back over this thread, it would be hard for anyone to see what you are driving at anymore, myself included. If I am missing something, where in this thread is a link to the demo? The code I wrote in post_#16 (http://www.dynamicdrive.com/forums/showpost.php?p=21567&postcount=16) of this thread shows how to make a close button that will only be visible to browsers other than IE. That really should work out as, (with your old demo) in IE the chromeless window had its own [x] to close button. To determine what you are now trying to do and if there is a way to do it that I can figure out, I'd need a more detailed explanation of your current aims and a link to a demo of your current best attempt. This would also be helpful to anyone else who wants to jump in and help on this one.