Subscribe to AppGini tips and tutorials using your favorite RSS news reader by clicking the link to the right.
Read more AppGini tips and tutorials

Displaying 2 tables in one page

The generated applications created by AppGini display the records of each table in a separate page. But sometimes, you might want to see two tables side-by-side in the same page.

For example, the following screenshots from the Northwind application show the suppliers table and the shippers table, each on a separate page. You have to switch between tabs or browser windows if you are working with both tables.




If you often work with both tables together, you might wish to display them side-by side instead, as shown below.


To do so, create a new file in your favorite text editor, and insert the following code to it:
<!doctype html public "-//W3C//DTD html 4.0 //en">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>Suppliers And Shippers</title>
	</head>
<body>
	<iframe
		frameborder="0" 
		width="49%" height="600" align="left" 
		src="suppliers_view.php"></iframe>
	<iframe
		frameborder="0"
		width="49%" height="600"
		src="shippers_view.php"></iframe>
	</body>
</html>
Change suppliers_view.php and shippers_view.php in the above code to the appropriate file names desired. Of course, this trick isn't 100% perfect. As you can see, the left table is too wide to fit on half the screen, which causes an annoying horizontal scroll bar to appear. However, I guess this could be an acceptable compromise in some cases.