Jump to content

This topic is 7790 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

This topic is 7790 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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