• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

PHP Pass URL and Open New Browser question

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.
0
drewman75
Asked:
drewman75
  • 3
1 Solution
 
rockmansatticCommented:
window.open("http://www.yahoo.com","","width=400,height=400")
should work

more code in a second.

Rockman
0
 
rockmansatticCommented:
Try this

<a href="#" onClick="window.open('../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.

Rockman
0
 
drewman75Author Commented:
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
0
 
rockmansatticCommented:
sorry,
change to this

<a href="#" onClick="window.open('../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.

rockman
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now