Pergunta

I used to use Firefox3.6 but with Firefox4.0 when certain amount of popoup windows are generated, following message will appear.

Prevent this page from creating additional dialogs

According to my research, about:config page has dom.popup_maximum variable to adjust max popup limit but I cannot ask my end users to change their browser setting just because of my app.

I searched alternative coding to popup. Many of them defines div and hide/show them with CSS using jQuery.

But I have 10 HTML pages with button that popup same page.

window.open("http://www.sample.com","samplePage");

I do not want to pre-define the contents of samplePage in every 10 pages for this reason.

Is there any alternative to popup which I do not have to pre-define in every page?

Foi útil?

Solução

You can still do the css trick, but put an iframe in the div.

Click button then does the following:
   1. Set iframe src attribute
   2. Show hidden div

Outras dicas

You can load that sample page dynamically. You either may use frames (especially <iframe>s in here) or any type of ayax, which means receiving data from the server (html, xml, json, whatever) and then showing the data in a <div>. You don't need jQuery for that.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top