This topic is locked

Pop-up window with master detail

4/17/2012 6:49:29 PM
PHPRunner General questions
author

I'm using PHP 6.0
Has anyone created a Pop up window using the value in the field under the cursor as the key to an SQL database.

This is needed to allow the user to view the master record corresponding to the value in the field under the cursor.

I want to be able to view the Master Record in a popup window from the Child screen.
I tried something I found to set up the field as custom on the View as settings dialog on the Visual Editor tab.
Here is a sample code to create a popup for the field:

strValue = "<a href=# onmouseover=""window.open('"& SESSION("TableName_mastertable") & "_list.asp',height=100,width=100);"">" & strValue & "</a>"


where TableName is your actual child table name.
but I get an error unexpected =

C
cgphp 4/18/2012

The code above is ASP not PHP. please, try the following version:

$value = "<a href=\"#\" onmouseover=\"window.open('". $_SESSION["TableName_mastertable"] . "_list.php',height=100,width=100);\">" . $value . "</a>";