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.

javascript -max

Featured Replies

  • Newbies

How on earth do access the data in a -max field.

ordinarily it is formname.fieldname.value="5"

however search.-max.value="5" doesn't work.

Thanks in advance.

Ric

What it does

Specifies the maximum number of records that should be returned per page.

Value is

A number from 1 thru 2147483647, or the word "All". The default value is 25.

Syntax example(s)

Specify the maximum number of records using a link

<a href="FMPro?-DB=Contacts&-Format=format.html&-Max=10&-FindAll">First 10 Records</a>

Specify the maximum number of records using a form action

< form action="FMPro" method="post">

<input type="hidden" name="-DB" value="contacts.fp5">

<input type="hidden" name="-Format" value="format.html">

<input type="hidden" name="-Max" value="10">

<input type="submit" name="-FindAll" value="First 10 Records">

</form>

I've put space after the <

Just to make the fact explicit: the -max tag has nothing to do with Javascript or Java, it's CDML.

Have you downloaded the CDML Reference database from the FileMaker web site? They're all in there.

The "-" in "-max" may be causing the problem, so try:

document.formname.elements[x].value = 5

"x" is the xth <input> element; they start counting at 0.

This should work. All the best.

Garry

  • Author
  • Newbies

Thanks garrycl I will try that, I was hoping not to do it that awy because if I extend the form it will change. Any how, at least it will work!!!

the javascript syntax for referencing a field with an irregular name (such as a name with a space or a hyphen) looks like this:

search["-max"].value

[ September 19, 2001: Message edited by: bman ]

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.