sayedsohail Posted September 23, 2007 Share Posted September 23, 2007 Hi everyone, any alternatives to popup window? I have to open a php file in a popup window, because i had .js and .css files specific to each form. But opening a popup window is like compromising for popup blocking on the user end and i don't see any other method where i can use something else instead of popupwindow/window.open. if i use div element with innerHTML, than i have to include the .js and .css files inside the parent window, this inturn is creating some conflicts with the parent css and .js files and also the parent window would be very heavy with loads of .js and .css. I am not sure, if i can achieve something better using iframe instead of popup window. Can someone suggest any idea? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/70405-solved-php-inside-a-div-or-iframe-or-popup-window/ Share on other sites More sharing options...
php_tom Posted September 24, 2007 Share Posted September 24, 2007 My understanding is that many popup blockers only stop popups that show up with no user action. But if you have your user click a link, then use javascript with onClick event, it shouldn't be blocked... If you're trying to get away from using JS, try <a href='whatever.php' target='TOP'>Link!</a> it should open a new window in IE, a new tab in FF. iframe wil only work if you're embedding HTML/PHP content in the page, like so: <iframe src='myPage.php'></iframe> If this all doesn't help you, post back explaining what you are trying to do. Quote Link to comment https://forums.phpfreaks.com/topic/70405-solved-php-inside-a-div-or-iframe-or-popup-window/#findComment-354029 Share on other sites More sharing options...
sayedsohail Posted September 24, 2007 Author Share Posted September 24, 2007 The problem is with the window.open sometimes its taking long to open the window and so for closing it. I thought if i could use IFRAME than it probably be much faster. Offcourse i need to embeed php js and css files inside the iframe. I am not sure if i can embeed all this files inside the iframe and make visible when users clicks/request for the next level of information i.e, forms, drops downs etc. Although i had achieved embeeding php inside a div element using ajax, but there is a small problem of embeeding .js files along with it. At the moment i can open a popup window with php script and embeed .js inside and it works perfectly fine, but what i am trying to achieve is when user clicks for information on parent window, i wish to call php script and .js inside the iframe or div instead of popup window. Please let me know if i missing something. Thanks for reading. Quote Link to comment https://forums.phpfreaks.com/topic/70405-solved-php-inside-a-div-or-iframe-or-popup-window/#findComment-354163 Share on other sites More sharing options...
ToonMariner Posted September 25, 2007 Share Posted September 25, 2007 My question is why are using a separate style sheet??? OK this is my opinion but consistency within a site is one of the key pointers to its success - I would suggest you restyle the 'pop-up' so it fits in with teh rest of yoru site - or add teh styles from the popup to teh main style sheet maybe alter the od class and id and make it fit. instead of looking for crappy solutions to work with what you have - try developong what you have to work nicely... Quote Link to comment https://forums.phpfreaks.com/topic/70405-solved-php-inside-a-div-or-iframe-or-popup-window/#findComment-354489 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.