Hi guys/gals,

Here is a snip of code I was testing for a part of my application.

It is very neat but doesn't meld well with my other session stuff.

Basically if you remove focus from the text box using blur(), it
submits the form and sets the Coldfusion variable.

Take a look and see if this could be improved or altered to work
better...

<script src="js/jquery.js" type="text/javascript"></script>

<script>
$(document).ready(function()
        {
                $('.binky').blur(function()
                        {
                                $("form").submit();
                        }
                );
        }
);
</script>

<cfif isdefined("form.asdf") and form.asdf neq "">
  <cfset session.comments = form.asdf>
  <cfoutput>#session.comments#</cfoutput>
</cfif>

<cfform action="" method="post" name="asdf">

  <cftextarea class="binky" name="asdf" cols="" rows=""></cftextarea>

</cfform>

Reply via email to