soci222 Posted February 17, 2004 Posted February 17, 2004 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
army Posted February 17, 2004 Posted February 17, 2004 I think like this: http://xxx.xxx.xx.xx/FMPro?-db=Database.fp5&-lay=Web&-error=errors.htm&-OP=gte&TIME=[FMP-field: Afternoon]&-max=10&-format=list.htm
soci222 Posted February 17, 2004 Author Posted February 17, 2004 The fact is that I have the link done. What I need is to abtain the variable in the URL in the page which the link refers to But thanks anyway
Mariano Peterson Posted February 17, 2004 Posted February 17, 2004 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.
Garry Claridge Posted February 18, 2004 Posted February 18, 2004 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
Mariano Peterson Posted February 18, 2004 Posted February 18, 2004 Whoops, let me eat my words! Good call Garry!
soci222 Posted February 18, 2004 Author Posted February 18, 2004 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
Vaughan Posted February 18, 2004 Posted February 18, 2004 As Garry said, Tokens are used to transport variables around between pages in CDML.
Recommended Posts
This topic is 7654 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 accountSign in
Already have an account? Sign in here.
Sign In Now