views:

123

answers:

2

Hi guys, i have popup-window in my script. I use window.open, but almost all browsers block this kind of windows. So i wanna change it to another popup, which include php-script. I saw it at another sites. As i understand, they use ajax. Could you provide for me some more info?

+2  A: 

Try out the solution provided by thickbox, I think this is what you're looking for.

marcgg
A: 

Hi,

First, you create a div (or other element) with the aspect you want, adding it the following extra css :

#popup {
  display: none;
  position: absolute;
  top: 100px; // changeable
  left: 100px; // changeable
}

Then you use javacript to change the css making the div visible, and add the xhtmlresponse from ajax to its innerhtml.

I'd recomment using jquery or other easy-to-use framework if you're used to js / ajax.

yoda