Click to See Complete Forum and Search --> : exit on menu


BuTcHoK
09-24-2003, 01:21 AM
I downloaded a menu script, but i dont know how to place "exit" where when clicked will close the window... could you guys help me with this

96turnerri
09-24-2003, 03:36 AM
<a href="#" onclick="self.close()">Close</a>

BuTcHoK
09-24-2003, 04:28 AM
thanks for the reply but it doesn't seem to work

i have pasted here the link from where i downloaded the menu for you to get a clearer picture of what i mean...

http://www.dynamicdrive.com/dynamicindex1/sm/index.htm

96turnerri
09-24-2003, 04:56 AM
you want to close the menu bar or the whole window?

BuTcHoK
09-24-2003, 05:09 AM
the whole window, to exit

96turnerri
09-24-2003, 05:18 AM
ok cool, well ive just looked at it and i think i will use it for the site i am currently making, when i get back from interview i will have a go for you because i need to edit it for my site about 1ish so expect a post about 1.30 this afternoon.

Wish me luck :D

pyro
09-24-2003, 07:36 AM
This link should show you how to do it: http://www.infinitypages.com/research/selfclose.htm

BuTcHoK
09-24-2003, 06:58 PM
it still doesnt seem to work...

here' what i've done... am i ryt?

function closewin() {
opener = self;
window.close();
}

function showToolbar()
{
//AddItem(id, text, hint, location, alternativeLocation);
menu.addItem("exitid", " EXIT ", "EXIT", closewin(), null);
menu.showMenu();
}

BuTcHoK
10-01-2003, 04:11 AM
hello!

could anyone help me with this? i still didn't get it..

i just dont know what to place on "location" to close the browser...

//AddItem(id, text, hint, location, alternativeLocation);

menu.addItem("exitid", " EXIT ", "EXIT", "?????",null);

pyro
10-01-2003, 07:11 AM
It's really going to depend on how the menu is written, but you could try:

opener = self;

function showToolbar() {
//AddItem(id, text, hint, location, alternativeLocation);
menu.addItem("exitid", " EXIT ", "EXIT", "javascript:window.close()", null);
menu.showMenu();
}

BuTcHoK
10-01-2003, 07:00 PM
thank you soooooooooooo much!!! i feel like kissing you...lol..
;) ...

its working, now i can use the menu :D ... god bless!!!

pyro
10-01-2003, 08:58 PM
You are very welcome, though I'd like to give on bit of advice. If your site uses JavaScript, you should be sure it continues to function for those uses who do not have it enabled. http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts