Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Dynamic Web Page

Posted by: joehesse Aug 28 2018, 11:27 AM

I have an html page, generated with php and mysql, that has an html table of real estate properties. The table has a hidden column. The cells in the hidden column contain folder paths. Each folder contains pdf, jpeg, and text files relvant to the real estate property in the row.

How do I do:
When a row is selected by the user, I want a <select> tag to appear listing the file names in the folder. I know how to write a php function that takes as input the folder name and generates the html <select> of files in the folder. I don't know how to make the <select> appear next to the table.

How do I do:
When the user selects an item (file) from the <select> tag, the file should open in a different browser tab.

Any pointers as to what I should look at would be much appreciated.

Thank you,
Joe

Posted by: Christian J Aug 28 2018, 02:53 PM

QUOTE(joehesse @ Aug 28 2018, 06:27 PM) *

How do I do:
When a row is selected by the user I want a <select> tag to appear

If it's just three options (PDF, JPEG and text) a SELECT menu is overkill. Three ordinary links would be more robust, and the user wouldn't have to open a SELECT menu.

QUOTE
I don't know how to make the <select> appear next to the table.

You could use javascript and CSS to make the list (or SELECT) for the selected row appear in a cell in that row.

You could also make it appear close to the whole table with CSS, if the exact position relative to the selected row is not important. Using CSS, the exact position may change depending on users' browsers or viewport sizes (e.g., on a smartphone maybe above or below the table works better, while a desktop browser might display it to the left or right).

QUOTE
How do I do:
When the user selects an item (file) from the <select> tag, the file should open in a different browser tab.

This can be done with javascript, but that adds more usability issues, see http://jkorpela.fi/forms/navmenu.html

With ordinary links you might use the TARGET="_blank" attribute, javascript won't be necessary.



Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)