Forum Moderators: mack
I'm also new with asp and jscript that's why I'm using MX to do most of the work.
What I'm trying to do is the following:
I'm using the Northwind DB as a test. I have two asp pages, one called Products (Master) and the other Supplier (Detail). The PK is SuppilerID. When I click on the link Product , I would like a popup window to open and display the Suppliers details. Using MX there is a behaviour for popups which I use but it only returns the first row of the SupplierID. The link is not passing the correct SupplierID. And second, when I click on the link Product, it loads the detail page correctly.
So, to cut a long story short, when I click the link Product I would like a popup window with the details of the supplier but the main page to remain as is. Not to reload.
Many Thanks
To get the correct information from the database you can pass the supplier ID through to the new popup in a QueryString, then on the popup page grab the Supplier ID from the QueryString to pull in the appropriate record from your database.
The link to open a basic new window (i.e without using javascript) would be something like
<a href="mypopup.asp?supplier=<%=SUPPLIER_ID%>" target="_blank">open supplier window</a>
Where the SUPPLIER_ID is a variable populated by the database.
On mypopup.asp you'd then grab the supplier...
strSQL="SELECT * FROM TBLSupplier WHERE ID="&Request.QueryString("supplier")
Hope that helps... and makes sense!
Katy