Is it not possible to have multiple cfforms on a page and submit them
using coldfusion.ajax.submitform

 

I tried this which I would think would work but it just gives this
JavaScript error "myform is not defined"

 

<cfajaximport> 

 

<script> 

    function submitForm(FormName) { 

                var FormName = FormName;

                alert(FormName); 

        ColdFusion.Ajax.submitForm(FormName, '~form-action.cfm',
callback, errorHandler); 

    } 

     

    function callback(text) 

    { 

        alert("Callback: " + text); 

    } 

     

    function errorHandler(code, msg) 

    { 

        alert("Error!!! " + code + ": " + msg); 

    } 

</script>

 

<cfform method="get" name="myform" id="myform"> 

    <cfinput name="tinput1"><br /> 

    <cfinput name="tinput2"> 

<a href="javascript:submitForm(myform)"><img src="mybutton.gif"
alt="Submit" width="100" height="25" border="0" /></a>     

</cfform>

 

Any ideas as to how I can have more than one form on a page and
accomplish this?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332648
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to