January 26, 200223 yr 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?
January 26, 200223 yr 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
January 26, 200223 yr 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
January 27, 200223 yr Author 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
January 29, 200223 yr 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
March 1, 200223 yr 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.
March 1, 200223 yr 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.
March 4, 200223 yr 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?
March 5, 200223 yr 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 ]
Create an account or sign in to comment