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.

Format of onchange event?

Featured Replies

I have a drop down list that I'd like to create a new record when a choice is made, then call an edit page so the rest of the fields can be entered. How do I format the onchange event? Would it be anything like this:??

onchange= "/FMPro?-db=request.fp5&-format=record_detail.htm&-lay=web&-new"

Thanks,

Mark Durgee

I would use a Form. Hence:

<select name="mylist" onchange="Javascript:document.myform.submit();">

All the best.

Garry

  • Author

Thanks for your reply Garry. That takes me to a page http://myURL/FMPro which doesn't work. Does the javascript need the NAME="-New" VALUE="Add Record" attributes in it? This is what the form element looks like now:

<SELECT NAME='CustNo' SIZE=1 onchange="Javascript:document.newform.submit();">

<OPTION VALUE=""> Choose a customer...

[FMP-InlineAction: -db=Cust.fp5, -lay=web, -sortfield=Name, -max=all, -findall][FMP-Record]

<option value="[FMP-Field:CustNo]">[FMP-Field:Name][/FMP-Record][/FMP-InlineAction]

</SELECT>

Thanks,

Mark Durgee

The Form needs all of the usual CDML tags. For example:

<form name="newform" action="FMPro" method="POST">

<input type="hidden" name="-db" value="requests.fp5">

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

<SELECT NAME='CustNo' SIZE=1 onchange="Javascript:document.newform.submit();">

<OPTION VALUE=""> Choose a customer...

[FMP-InlineAction: -db=Cust.fp5, -lay=web, -sortfield=Name, -max=all, -findall][FMP-Record]

<option value="[FMP-Field:CustNo]">[FMP-Field:Name][/FMP-Record][/FMP-InlineAction]

</SELECT>

<input type="hidden" name="-new">

</form>

All the best.

Garry

  • Author

<input type="hidden" name="-new">

Thanks Garry, that's what I was missing.

Mark Durgee

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.