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.

Cheers!!!

Recommended Answers

All 4 Replies

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

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

Airshow

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.