Jump to content
Server Maintenance This Week. ×

Access an URL variable


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

Recommended Posts

Imagine I have this link on a page:

http://xxx.xxx.xx.xx/FMPro?-db=Database.fp5&-lay=Web&-error=errors.htm&-OP=gte&TIME=Afternoon&-max=10&-format=list.htm

how can I show in the linked page something like this

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

on the afternoon we have:

record1,2,3,4.... (all the records go here)

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

I know how to show the records from the DB but not how to extract the variable time=afternoon which is an URL variable.

Does anyone knows? thanks in advance

Link to comment
Share on other sites

CDML is not capable of doing that. It is one of the many very disappointing aspects of CDML. You'll need regular middleware to achieve that functionality, such as PHP, Lasso, ASP, etc.

Using PHP, you would get the value from the following statement:

print $_REQUEST['TIME'];

This would output "Afternoon" to the browser.

Link to comment
Share on other sites

One method is to use the "[FMP-FindValueItem]" tag:

From the "CDML Reference" database

What it does

[FMP-FindFieldItem] is replaced with the field name that was part of the find request that created this page.

[FMP-FindFieldItem] must be placed between the [FMP-CurrentFind] and [/FMP-CurrentFind] tags.

Syntax

[FMP-FindFieldItem: 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)

Return the current find criteria using an HTML file

Current find request is:<br>

[FMP-CurrentFind]

Field: [FMP-FindFieldItem], Op: [FMP-FindOpItem] Value: [FMP-FindValueItem]<br>

[/FMP-CurrentFind]

<!-- After processing it could look like:

Current find request is:

Field: First Name, Op: begins with Value: Joe

Field: Last Name, Op: equals Value: Doe

-->

Some other CDML options may exist, such as Tokens.

Good Luck.

Garry

Link to comment
Share on other sites

Well Mariano, if i'm not wrong [FMP-FindValueItem] does return ALL of your URL variables so it doesn't do the job as I only want to show one. Combining [FMP-FindValueItem] with javascript should do the work. I'll try it later. If it works I'll post it here

Link to comment
Share on other sites

This topic is 7387 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.