Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

FF not closing Tabs as direct by web application - works fine in IE

  • 4 ответа
  • 1 имеет эту проблему
  • 2 просмотра
  • Последний ответ от the-edmeister

more options

We are releasing a new version of our Web site. www.norfolkresearch.org In order to give users a preview, we include a button on the current version that is supposed to close the current version and open the new version in a new tab or window. There is a button in the new vrsion that does the reverse. The versions can not be open at the same time. This functionality works fine in IE.. FF opens the new version but does not close the other version. This seems to happening only for the first time the switch is attempted durring a session. If you manually close the version you start from.and then attemtp to switch back and forth between the versions it works as expected . We are using v12 and 13 on a PC and v6 on a MAC

We are releasing a new version of our Web site. www.norfolkresearch.org In order to give users a preview, we include a button on the current version that is supposed to close the current version and open the new version in a new tab or window. There is a button in the new vrsion that does the reverse. The versions can not be open at the same time. This functionality works fine in IE.. FF opens the new version but does not close the other version. This seems to happening only for the first time the switch is attempted durring a session. If you manually close the version you start from.and then attemtp to switch back and forth between the versions it works as expected . We are using v12 and 13 on a PC and v6 on a MAC

Все ответы (4)

more options

Generally speaking, Firefox does not allow a script to close a window or tab unless a script initially opened that window or tab. There might be an error message in the console (Ctrl+Shift+j) when this happens, i.e., when closing the window/tab is blocked. Can you confirm whether this is the issue?

more options

Hi,

Thanks for the reply. Your repsonse does explain the behavior. Although I believe it worked with older versions of Firefox. Hitting contro+shit didn't turn anything up. I've run firebug while hitting the button to run this function and no errors show up using it's toolbar -> console->errors. You can try it yourself going to www.norfolkresearch.org and then hitting the button that says Use Public Search Version 2. Is there anyway of getting around this Firefox restriction ?

more options

In order to get around the restriction, you need to use a signed script:

JavaScript Security: Signed Scripts
Signed Scripts & Privileges: An Example

more options

That behavior is the same (not allowing a website to close a window that it didn't open itself) going all the way back to Firefox 2.0, the oldest version I currently have installed on this PC.