pop up window

Posted on 2005-04-24
Last Modified: 2013-11-28
Hi all,

I've been asking a few questions this week, thanks for everyone's patience. I'm developing a small school report system. What I'm trying to do is once a pupil is selected, a pop up window is created with their report in it. The trouble is, the form will be using variables from the url i.e. $_GET and the pop up I want will not have an address bar (you know, the neat small windows that pop up with user information) there a way round this?

Question by:katneej
    LVL 27

    Expert Comment

    Hi Kate,

    I am not quite sure i understand the problem. Even if the address bar is not displayed in the pop up window, provided the query string was present in the URL to be loaded, the GET array will still be populated.

    For example, if you had a file containing:

    <script language="JavaScript"> ("test.php?test=value","mywindow","width=300,height=200");

    and test.php contained:


    Test.php, when displayed as a pop up would show:

    Array ( [test] => value )

    Ie. The index, 'test', is present in the GET array.


    Author Comment

    Hi Diablo,

    Thats brilliant. Any how  I would call the javascript pop-up window from the php statment, i.e.

     echo "<td ><a href=''editor.php?group=$GroupID')'>Group $GroupName</a></td>";

    doesn't seem to work, wouldn't i have to send the url to a seperate function?
    LVL 27

    Accepted Solution

    The main problem there is the quotes.

    You would have to do something like this:

    echo "<td ><a href=\"#\" onClick=\"'editor.php?group=$GroupID');return false;\">Group $GroupName</a></td>";

    Note that the backslash is used to escape the quotes that are to be outputted.

    Or, if you wanted to size it to specific dimensions:

    echo "<td ><a href=\"#\" onClick=\"'editor.php?group=$GroupID','WindowName','width=300,height=200');return false;\">Group $GroupName</a></td>";


    Author Comment

    wow, very impressed, thanks very much...the pop up window will be a form you see which interfaces with the MySql database, i thought it would look a lot more professinal in its own pop-up...I think I will use a bigger size for it than usual because I wouldn't want the box to be small for the form..

    anyway, thanks very very much for you help!

    Katie :)
    LVL 27

    Expert Comment

    no problem :)


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now