Page 1 of 1

Main Menu "Close Window" Javascript possible?

Posted: 02 Oct 2009, 14:30
by 52347866
I would like my users to be able to close the gallery by pressing a link on the main menu so they can be returned to my main website inventory page.

Any help is greatly appreciated! :lol:

Posted: 04 Oct 2009, 10:20
by mjau-mjau
Well, I am not completely sure what you mean here ... Are you opening the "gallery" in a separate browser window then? (since you say you want a "close" button so they can "return" to the website)

... or do you simply want a button in your menu to link back to the startpage in the gallery ...?

Adding a "close" function with javascript is possible, but browsers dont like it much, as they are considered security threats since they are intiated by javascript. It should work fine if the window was opened from within the gallery, but visitor will normally get a warning message "blah.com site is trying to close this window. Are you sure you want to close this window?"

Trying to "close" a window that was NOT initiated with the gallery does not work in new browsers.

Posted: 04 Oct 2009, 15:12
by 52347866
Hi Karl,

I would like to have a 'close window' link in the main menu of the gallery. So here is what I am referring to: http://www.autoclassix.com/inventory.html

Clicking on a vehicle opens up the gallery in a new window, so then I would like my users to be able to close the gallery, returning them to my inventory page. As shown on my main menu list a link stating 'return to inventory' really just closes the gallery browser window.

unless you have a better idea?

Thanks,

Matt Williams

Posted: 06 Oct 2009, 01:40
by mjau-mjau
So that is your site then? You already have a link in the menu that takes the visitor BACK to the main page. I am not sure why(or where) you want a close button ... Close buttons close something. You dont want to, and you wont be able to close that window ... If you close it, how can it go back if the window is closed?

Perhaps I am missing something, but I cant really see any other feasible solutions than the one you are already using.