> The zero is not missing going into the query its missing going back to 
> the cfinput text box. If I dump the CFC results the leading zero is 
> there. Something is happening with the bind output results. 

heres a seriously STUPID way of having to het this done...  This fn will ensure 
a leading 0 in a zip code...  Sorry about any code wrapping


  <cfselect name="OrgZip" id="OrgZip" 
bind="cfc:object.OrgSelects.getZipCodes({state})"
        value="value" display="value" required="yes"
        message="Please select a Zip Code (i.e. PA, TN, etc.)."
        bindonload="true" style="font-size:12px;"
        />
  
                <cfajaxproxy bind="javascript:test({OrgZip})">
                <!--- Seriously stupid hack, to add a leading 0 when 
necessary--->
                        <script>
                
                        function test(x) {
                                var imdone = false;
                                if(!imdone) {
                                        var dd = 
document.getElementById('OrgZip');
                                        for(var i = 0; i < dd.length; i++){
                                                with (dd.options[i]) {
                                                        if(text.length < 5 ){
                                                                text = '0'+text;
                                                                value = 
'0'+value;
                                                        }
                                                }
                                        }
                                        imdone = true;
                                }
                        }
                        </script>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:323190
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to