Hi mate,

I have a problem in javascript/php/ajax.

Look I have three pages 1)index.php 2)login.php 3)client.php. At index.php I have a link to login page, it opens a popup. When I submit the login page and try to redirect to client page, Here is the problem arise.

I successfully redirect to the client page but it opens in popup window.

Did anyone know How to get rid of that? I want, when I click on submit the client page open at same location on parent window.

Any help would be appreciated.


9 Years
Discussion Span
Last Post by almostbob

You need to arrange for the popup window to perform the following sequence:

  • Display login dialog
  • User interacts
  • Submit a login request to the server
  • Receive back login confirmation/denial (eg by re-serving different variants of the login dialog page to the popup)
  • On denial, allow user to have another go etc. etc.
  • On confirmation, command main window to redirect to client page (opener.location.href="......"); then popup must close itself ( window.close() ).



Can you provide some code, it will be much easier for someone to help you.

Hi Thirusha, thanks for replying me. I have got my solution. so thanks for your concern.

Bye TC


popups are blocked on many systems
better is login opens in a layer above the index page and redirect is automatic
less likely to be affected by security softwares

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.