Skip to main content
Participant
January 29, 2009
Question

Binds without click (cfinput Button)

  • January 29, 2009
  • 2 replies
  • 645 views
I have a page that has three input fields. 2 cfinput text and 1 cftextarea besides some hidden fields. I have this bound to a cfinput button. I type in the first cfinput text and then click or tab to the second and it is as if I clicked the cfinput button. See Code below. I am at a loss. I have taken all the guts out of the cfc since it really does not matter.

Please any help would be much appreciated.

********** cfform *******************
<cfform method="post" name="postnotes">
<cfinput type="hidden" name="trade" id="trade" value="4">
<cfinput type="hidden" name="ida" id="trade" value="2548">
<cfinput type="hidden" name="project" id="project" value="3">
<cfinput type="text" name="newemail" id="newemail" size="60"><br />
<cfinput type="text" name="newtxt" id="newtxt" size="60"><br />
<cftextarea name="notes" style="height:75px;width:400px;" enabled="no" value="TEST" visable="no" /><br />

<cfinput type="button" bind="cfc:lookups.savenotes({savebutton@click},{ida},{notes},{newemail},{newtxt})" name="savebutton" value="Save Now">
</cfform>

******************** cfc function *********************

<cffunction name="savenotes" access="remote">

<cfargument name="savebutton" required="yes">
<cfargument name="ida" required="yes">
<cfargument name="notes" required="yes">
<cfargument name="newemail" required="yes">
<cfargument name="newtxt" required="yes">


<cfset findpm = "Done">
<cfreturn findpm>
</cffunction>
This topic has been closed for replies.

2 replies

Inspiring
February 1, 2009
the correct syntax for a bind without a trigger is @none. you can also
use @change, @blur and other events to trigger a bind.

@click is the default event and you do not need to explicitly specify it
like you do.

it's all in the docs, by the way...


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
RickEpAuthor
Participant
January 31, 2009
If anyone is interested I figured this one out.

<cfinput type="button" bind="cfc:lookups.savenotes({savebutton@click},{ida@},{notes@},{newemail@},{newtxt@})" name="savebutton" value="Save Now">
</cfform>