Jump to content

This topic is 8197 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello again!

I'm having problems with links inside a generic intranet-site that I have published on our LAN. Here's what I'm trying to achieve:-

- Users start in a main index page, with ~10 database links.

- Each database link takes them to the same web folder: "http://database_server/generic_dbase/FMPro?-db=DatabaseX.FP3&-lay=Main&-format=search_results.htm&-max=10&-findall" - in each link, "DatabaseX" will be the name of that individual database.

- User clicks on a link, and the page "search_results.htm" is opened, listing the entire contents of the selected database (as intended).

- At the top of the page are links to SEARCH the database for specific records - and herein lies my problem...

The link which the SEARCH button links to is always a fixed URL, therefore regardless of which database has been opened, the search page will always open up the search for the same database (ie the one specified in the link), for example:-

"Database 2" opened

Search results lists all records in "Database 2"

User clicks SEARCH button.

Search page opens for "Database 1"

"Database 3" opened

Search results lists all records in "Database 3"

User clicks SEARCH button.

Search page opens for "Database 1"

..and so on.

I'm not using IWP, so how do I make the "-db=" part of a link dynamic (so that it will always specify the current database rather than the same, fixed database)?

Cheers,

Dan

Posted

"- User clicks on a link, and the page "search_results.htm" is opened, listing the entire contents of the selected database"

Have you considered using this result directly, i.e., each item listed is used as your link (instead of the "Search" at the top of the page? Thus Database2 might have an anchor attached to it which provides your clickable link to db2

(I'm leaving off the opening a href and the ending anchor tag is incomplete so the code will show)

=fmpro?-db=database2.fp5&-lay=main&-format=db2findall.htm&-findall">Database2</

Also, if you do not have the cdml reference database, you would be well advised to download it from FMI.

Posted

From CDML reference:

*******************************************

What it does

[FMP-CurrentDatabase] is replaced with the name of the database being processed.

Syntax

[FMP-CurrentDatabase: Encoding ]

Parameter(s)

First parameter (optional)??? Encoding. Use one of the following reserved words:

Raw - Don't perform any encoding

URL - Perform URL encoding

HTML - (default) Perform HTML encoding

Syntax example(s)

Returns the name of the current database, using an HTML file

You are viewing the [FMP-CurrentDatabase: HTML] database.

<!-- After processing it could look like:

You are viewing the Contact.fp5 database.

-->

See also

-DB

*******************************************

This topic is 8197 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.