Gossamer Forum
Home : Products : DBMan : Customization :

Display only 1 field using links no ssi

Quote Reply
Display only 1 field using links no ssi
I have created an assignments database for my school using dbman.

I dont have SSI. Since the assignments/notes field(where teachers type in the assignment) requires long content storage(like 1500 words or so), I dont want it to be displayed in normal view/find results page. I want that there should be a link next to the assignments heading(during view/all results) so that when the user clicks on the link he is taken to a separate page (or a window) where only the content of the field is shown. It should not be shown while displaying the record normally.

Please help as to what I should change in which file.

TSRSwebmaster
Quote Reply
Re: [tsrswebmaster] Display only 1 field using links no ssi In reply to
You could use the short/long mod to do exactly what you want. Check out the resources section, or look at any of LoisC's posts for the link to the "Unofficial" FAQ for more mods.

Another alternative would be to use javascript to open a new window and display the "notes" section there. I do some thing similar with a fax cover page as such:

(Here I am using a button, but you could convert it to a link)

<input type="button" name="PrintCvrSheet" value="Print Cover Sheet" onClick="window.open('http://www.yourdomain.com/coversheet.htm','popuppage','width=500,height=600,top=100,left=100');">

Then create a file called coversheet.htm (or change it to notes, etc.) and somewhere in that html file put the following:

<script>document.write(window.opener.form.NOTES.value)</script>

Of course, you'd have to have a hidden field called NOTES on your html.pl page.

Good luck! Hope either one works for you.
Quote Reply
Re: [tsrswebmaster] Display only 1 field using links no ssi In reply to
I made a database which students filled out for an assignment. There were fields I wanted only the teacher to see (the name of the student, class section, what day it was handed in, etc.).

Rather than a short/long display, it was easier in my case to make certain fields accessible only to admin. So the teacher logs on as admin, but the students can view other fields as default users.

Here is my sub html_record

Code:


print qq|

<hr> $rec{'Name'}

<br> $rec{'Instructor'},

Section $rec{'Section'}<br><br>


| if ($per_admin);

print qq|


$rec{'Author'}, "$rec{'Title'}," <i>$rec{'Source'}</i>. $rec{'Volume'}:$rec{'Issue'},$rec{'Pages'}.<br>
<b>Abstract:</b> $rec{'Abstract'}<br>


|;
}




So only admin can see the Name, Instructor, and Section part of the records (you could also record grades this way so only the teacher could see them)