PHP Pass URL and Open New Browser question

Posted on 2004-11-11
Last Modified: 2010-04-25
Hi All,
  I know this is probably rather simplistic, but I am getting some errors and I have drawn a blank.  I am building a mysql database driven site utilizing dreamweaver.  i have a window that displays some items (using repeating region) and then I want the user to be able to click on the item_name and bring up another browser window that has a larger picture and a more detailed description (all fields are within the same db table).  these fields are all in the database, so i am basically trying to do something equivalent to a master-detail type page transition.  in the 'item_name' field of the database I have the following:

<a href="../pages/item_desc.php?item_number=<?php echo $row_lucky['item_number']; ?>" title="Item Description" target="_blank">This is my item name</a>

what I need to do is also be able to set status=yes, scrollbar=yes,resizeable=yes,width=533, and height=376

i have tried many a combination of this including a javascript in the header and calling it, but with no success.  But ideally I would like to have all this in the actual table field.  Anybody have any ideas on what the syntax needs to be?  Thanks so much.
Question by:drewman75
    LVL 10

    Expert Comment

    should work

    more code in a second.

    LVL 10

    Expert Comment

    Try this

    <a href="#" onClick="'../pages/item_desc.php?item_number=<?php echo $row_lucky['item_number']; ?>','PopUp','toolbar=no,status=no,width=200,height=100')">Item Name</a>

    This should work.
    Just know that you may want to tell your audiance that javascript is being used...some users have it turned off.


    Author Comment

    hmm, i was for sure that was going to work.  but when i click on it, it doesn't do anything.  is there something i have to substitute for th # in <a href="#" since i notice when I put the cursor over the link it reads out 'http://www......./item_desc.php#'.  Thanks so much
    LVL 10

    Accepted Solution

    change to this

    <a href="#" onClick="'../pages/item_desc.php?item_number='+<?php echo "this";?>,'PopUp','toolbar=no,status=no,width=200,height=100')">Item Name</a>

    no, the # sign is a null for the browser and lets the javscript do the work of opening  a new window.

    if you want to set the height and width of a window, I think javascript is the only way.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Extra Spacing In Pattern Matching 13 307
    CSS Layout Help 7 207
    Edit Muse Website with Dreamweaver 6 777
    frames top frame repeats 4 120
    I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
    This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now