bnix Posted January 26, 2002 Posted January 26, 2002 What is the best way to move to different web pages? I tried <A HREF="FMPro?-db=AEquipmentInventory&-lay=addlayout&-format= [FMP-IF:CurrentToken:0.eq.xyz]search1.htm[FMP-ELSE]search.htm [/FMP-IF]&-view" TARGET=b><FONT FACE="arial">View/Edit Records</FONT></A> I get an error message in the browser that says, the format files can not be found "[FMP-IF:CurrentToken:0.eq.xyz]search1.htm[FMP-ELSE]search.htm [/FMP-IF]" What is the secret to redirect pages?
Garry Claridge Posted January 26, 2002 Posted January 26, 2002 The page containing the URL needs to be processed by FM first before the [FMP] tags can be actioned. This means that the URL is in a page which has been called as a Format file. The Token will need to be assigned a value in the calling form/URL, prior to its use. Hope this helps. Garry
bnix Posted January 26, 2002 Author Posted January 26, 2002 Can you set up a &-format to take a token value?
Garry Claridge Posted January 26, 2002 Posted January 26, 2002 Yes, however that page will need to be processed by FM first; e.g.: &-format=[FMP-CurrentToken]& To achieve your selection of format file try this: <A HREF="FMPro?-db=AEquipmentInventory&-lay=addlayout&-format=searchx.htm&-token=xyz&-view" TARGET=b><FONT FACE="arial">View/Edit Records</FONT></A> 'searchx.htm' can contain: [FMP-If: CurrentToken: 0 .eq. xyz] [FMP-Include: search1.htm] [FMP-Else] [FMP-Include: search.htm] [/FMP-If] This will do the job! Garry
bnix Posted January 27, 2002 Author Posted January 27, 2002 Thanks Garry, It worked find. Now the following code <select name="-SortField"> <option value="">-None- [FMP-LayoutFields] <option>[FMP-FieldName: Raw] [/FMP-LayoutFields] </select> only shows the first fieldname and the other are blank. If I remove the fmp-if stuff it show all fields. Again thanks
Garry Claridge Posted January 29, 2002 Posted January 29, 2002 Try placing the code from each of the pages between the [FMP-If] [FMP-Else] [/FMP-If] tags. Seems like the 'find' request is not being carried through to the Included page. I'm travelling for the next week, so I won't have a chance to test it until I'm back. All the best. Garry
JenG Posted March 1, 2002 Posted March 1, 2002 I'm trying to do a similar thing in the form tag, but I don't seem to be having much luck. If the user deletes the record I want them to go to a different reply page than if edit the record. Here's what I've got - code: <FORM ACTION="FMPro" METHOD="POST"> <FONT FACE="verdana"><INPUT TYPE="hidden" NAME="-DB" VALUE="file1"> <INPUT TYPE="hidden" NAME="-Lay" VALUE="Layout #1"> <INPUT TYPE="hidden" NAME="-Format" VALUE="[FMP-If: CurrentAction .eq. Delete] [record_detail_reply.htm] [FMP-Else] [record_detail_reply2.htm][/FMP-If]"><INPUT TYPE="hidden" NAME="-Error" VALUE="record_detail_error.htm"> <INPUT TYPE="hidden" NAME="-recid" VALUE="[fmp-currentrecid]"> I haven't used the FMP-If tag before so I'm a little unsure of the exact syntax. Any help on this would be much appreciated.
Keith M. Davie Posted March 1, 2002 Posted March 1, 2002 Get the If out of the form action. Use the If conditional on your format file such that it If this display such and such else display some other text end if.
JenG Posted March 4, 2002 Posted March 4, 2002 Thanks for you reply, the reason why I asked is that if I send the user to my default reply page (after deleting a record), the user then clicks onto link which takes the them to the search page - 'FMPro?-db=database&-lay=Layout%20%231&-format=search.htm&-view' I'm finding that the drop down lists on this page do not have any values. But if I open up a new browser window and use the same link, the drop downs are fine. Any ideas?
Keith M. Davie Posted March 5, 2002 Posted March 5, 2002 Yes, I have plenty olf ideas. Unfortunately I don't get paid for them. Idea 1. By allowing the delete function to clients, if they are the general public, you put all records at risk of deletion. Idea 2. Change your action tag from -view to something else. Idea 3. If you insist on allowing the delete function, use a meta redirect. Idea 4. I might consider a script, but then I know how to run them safely. (Using a script one can delete a record without allowing the "Delete" attribute in Web Security. I use this technique at http://www.simplifyfm.com:591/ ) [ March 05, 2002, 09:21 AM: Message edited by: Keith M. Davie ]
Recommended Posts
This topic is 8368 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