Can I load the max value of the range attribute in CFINPUT using and AJAX call?

Posted by Eric Belair on Stack Overflow See other posts from Stack Overflow or by Eric Belair
Published on 2010-04-29T16:04:31Z Indexed on 2010/04/29 16:07 UTC
Read the original article Hit count: 244

Filed under:
|
|
|
|

I have a CFINPUT tag in a CFFORM:

<cfinput 
    type="text" 
    id="itemInput" 
    name="itemInput" />

I want to set the range dynamically without posting the page. I have several AJAX calls throughout the page to dynamically load form fields on the fly:

<cfselect id="this" name="this" bind="cfc:Data.getThis()" bindonload="true" />

<cfselect id="that" name="that" bind="cfc:Data.getThat({p1})" />

<cfselect id="theOther" name="theOther" bind="cfc:Data.getTheOther({p1}, {p2})" />

<cfdiv 
    id="maxQty" 
    bind="cfc:Data.getMaxQty({itemId})" />

<cfinput 
    type="text" 
    id="qty" 
    name="qty" />

<cfdiv 
    id="itemId" 
    bind="cfc:Data.getItemId({this}, {that}, {theOther})" />

In the above CFFORM, I basically want to set the minValue of the range to "1" and the maxValue of the range to the value of cfc:Data.getMaxQty({itemId}).

Is this possible? How can I do it?

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about AJAX