mdurg Posted October 1, 2003 Posted October 1, 2003 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
Garry Claridge Posted October 1, 2003 Posted October 1, 2003 I would use a Form. Hence: <select name="mylist" onchange="Javascript:document.myform.submit();"> All the best. Garry
mdurg Posted October 1, 2003 Author Posted October 1, 2003 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
Garry Claridge Posted October 1, 2003 Posted October 1, 2003 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
mdurg Posted October 5, 2003 Author Posted October 5, 2003 <input type="hidden" name="-new"> Thanks Garry, that's what I was missing. Mark Durgee
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now