Jump to content

[SOLVED] php inside a div or iframe or popup window?


sayedsohail

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.