Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Redirect to different pages

Featured Replies

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?

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

  • Author

Can you set up a &-format to take a token value?

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

  • 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

  • Author

Thanks all,

I finally got it to work.

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

  • 1 month later...

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.

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.

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?

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.