Passing file name via form

S

Scott

I'm almost purely a design view front page user.

Currently I am just copying and pasting a form and a
results field to each page. I then creating a hidden
field called FileName which I change to the current file
name manually. I then pass to the database and store it
under FileName. I also use the database results wizzard
and filter it manually using the FileName database entry.

For efficiency, I would like to have an include file that
I can reuse on all my pages. This include file would
consist of a form to collect the file name of the page
(not the include file page, but the page it was included
on). The include file will also include the database
results, filtered to only include those entries in the
database with that particular file name.

I have a hunch I can do this pretty easily by changing
some of the FrontPage code, maybe using some asp.

Here is the code I currenty use that is developed by
FrontPage. I've editted out the non-essential code. Take
a look at everywhere it says Baja3. Baja3 is what I'm
using to represent the file name. I'd like to
automatically generate this. If somebody could help me
out with this, I would be extremely greatful!

CODE FOR THE FORM THAT PASSES THE FILENAME (Baja3) TO THE
DATABASE

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" SuggestedExt="asp"
S-Form-Fields="FileName Email Name Comments"
S-Form-DBFields="FileName e-mail Name Comment"
<!--webbot bot="SaveDatabase" i-checksum="34604" endspan -
->
<input type="hidden" name="FileName" value="Baja3">
</form>

CODE FOR DATABASE RESULTS FILTERED BY FILENAME
<!--webbot bot="DatabaseRegionStart"
s-columnnames="ID,Name,e-mail,Comment,Date,FileName"
s-displaycolumns="ID,Name,email,Comment,Date,FileName"
<%
<%
fp_sQry="SELECT * FROM PageComments WHERE (FileName
LIKE 'Baja3') ORDER BY Date ASC"
%>
 
M

MD WebsUnlimited.com

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top