I'm trying to improve the display of data by an old app of ours, and I'm confused. Currently the app displays a single record from our DB by just dumping the data stored in each field onto the "surface" of the browser. The app loops through the fields of the SELECT query in turn, displaying first the name of the field and then the field content. It's pretty primitive! Records can be very large, and the user has to scroll the entire browser page up and down to see the various fields. I would like instead to put the content of each field inside of a scrollable iframe with only the field name on the "surface" of the browser, making it much more manageable for the user to look at different parts of the record at one time.
Here's the basic setup now... The app creates a "result" page with a list of hyperlinks. The href of each hyperlink looks basically like this:
href="$url/DisplayRecord.html?thisId=$id"
The PUBLIC function DisplayRecord retrieves the record whose id was passed to $thisId and more or less dumps the record to the screen as described above. (Some other stuff happens and some markup is applied to certain retrieved field values, based on previous user actions, but it's essentially a record dump.)
Here's what I tried so far: I created a PUBLIC function called IFrameDisplay to which I pass the text that would otherwise be dumped to the browser surface in DisplayRecord. In DisplayRecord where the field value is normally just printed, I have instead an iframe, like this:
<iframe src="$url/IFrameDisplay.html?thisData=$ret">
BTW, $ret is the output of a function called in DisplayRecord that adds markup, does some formatting of the field value, etc., before "dumping" it to the screen. This isn't working right. I think that something in the field data itself is being interpreted as HTML and messing up the rendering, but I'm not sure.
Anyway, it feels like I'm spinning my wheels on this. A nudge in the right direction would be appreciated.
As usual, thanks.
Here's the basic setup now... The app creates a "result" page with a list of hyperlinks. The href of each hyperlink looks basically like this:
href="$url/DisplayRecord.html?thisId=$id"
The PUBLIC function DisplayRecord retrieves the record whose id was passed to $thisId and more or less dumps the record to the screen as described above. (Some other stuff happens and some markup is applied to certain retrieved field values, based on previous user actions, but it's essentially a record dump.)
Here's what I tried so far: I created a PUBLIC function called IFrameDisplay to which I pass the text that would otherwise be dumped to the browser surface in DisplayRecord. In DisplayRecord where the field value is normally just printed, I have instead an iframe, like this:
<iframe src="$url/IFrameDisplay.html?thisData=$ret">
BTW, $ret is the output of a function called in DisplayRecord that adds markup, does some formatting of the field value, etc., before "dumping" it to the screen. This isn't working right. I think that something in the field data itself is being interpreted as HTML and messing up the rendering, but I'm not sure.
Anyway, it feels like I'm spinning my wheels on this. A nudge in the right direction would be appreciated.
As usual, thanks.