Jump to content

Recommended Posts

I have a page that will sort my DB table by name and telephone number.  And it has a button.  I want visitors to be able to input a last name, and have the telephone number provided in a SEPERATE and NEW window after they click the button.

 

Any suggestions for best procedure?

 

My two initial concepts are:

1- Make this a form, with the "action" leading to a file like

SELECT *FROM myTable WHERE last name="$inputname"

and have then use Javascript ONSUBMIT to open a NEW window.

(not sure it will succeed as I desire)

 

2- Make this a simple BUTTON with Javascript pointing everything to the file to process the quiery.

 

PS: I've heard IE doesn't always handle "_BLANK" properly, and I'm unaware of a PHP method.

 

Haven't thought it through entirely, so I'm looking for pointers and advise.

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/258663-opening-a-new-window/
Share on other sites

In general, popups and popupblockers have made this type of approach difficult for developers who are not in a controlled environment (ie. an intranet).    The alternative is to use javascript and simulate modal dialogs which can be done very easily using jquery and related code.  Google jquery dialog and look at articles like this one:  http://www.jquery4u.com/windows/14-jquery-modal-dialog-boxes/

Most of the popup blocking rules don't apply to intranets so you can probably go that way.  Jquery is a cross browser javascript framework.  It is by far the most heavily used framework of its kind, and I can't advise strongly enough that you will benefit from learning it and employing it in your project -- intranet or not.

 

At the end of the day, having multiple browser windows open is problematic and just not the general trend.  This is why all the browsers implemented tabbed browsing.  If what you are after is this:

 

Main Results Table -> search dialog to refine results -> intermediary result to choose refinement criteria -> Update Main results

 

That requires coordination and passing of results, as well as inter window communication.  Having 1 or 2 popups is bound to confuse someone as those windows stay open and can get backgrounded or hidden behind another window very easily.

 

 

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.