0

I am trying to Bind the value of Qty and Price to the Linetotal field but I'm get an error

window:global: uncaught exception: [Exception... "'SyntaxError: parseJSON' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "JS frame :: chrome://firebug/content/net/spy.js :: callPageHandler :: line 807" data: no] (, line 0)

I'm calling my cfc which does nothing but multiple Qty*Price

<cffunction name="GetLineTotal" access="remote">
        <cfargument name="Qty"> 
        <cfargument name="Price"> 
    <cfset Mytotal = DeserializeJSON(arguments.Qty) * DeserializeJSON(arguments.Price)>
            	
                <cfreturn Mytotal>

and here is my form .. Thanks

<cfform name="mycfform">
        <cfinput type="text" name="Qty"  size="10">

    <cfinput type="text" name="Price"  size="10">

    <cfinput type="text" name="Linetotal" value=""  size="10" bind="cfc:func.GetLineTotal({Qty@keyup},{Price@keyup})" >

</cfform>
1
Contributor
1
Reply
3
Views
5 Years
Discussion Span
Last Post by jayst19143
0

Oh well I figured it out.. I used javascript instead

<script language="javascript">
function DoTotal(Qty,Price){
 var q = document.getElementById("Qty").value;
 var p = document.getElementById("Price").value;
document.getElementById("LineTotal").value = q*p;
    }

</script>

Edited by Dani: Formatting fixed

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.