October 1, 200322 yr 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
October 1, 200322 yr I would use a Form. Hence: <select name="mylist" onchange="Javascript:document.myform.submit();"> All the best. Garry
October 1, 200322 yr 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
October 1, 200322 yr 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
October 5, 200322 yr Author <input type="hidden" name="-new"> Thanks Garry, that's what I was missing. Mark Durgee
Create an account or sign in to comment