You're surrounding the input tag with the form:text1 element? If you look at View Source in the browser you'll see that the output of SHtml.text does not include your input tag, but uses its own. The simplest solution is to put your custom attributes in the scala code: SHtml.text(text1, text1 = _, "id"->"sum2", "size"->"8") Then in the template just put <form:text1 />
------------------------------------- Madhav<[email protected]> wrote: hi Naftoli my snippet has following code for binding bind("form", xhtml, "text1" -> SHtml.text(text1, text1= _), "text2" -> SHtml.text(text2,text2 = _), "result" ->SHtml.text(result, result = _, ), "submit" -> SHtml.submit(add, addition)) and in my html file i am doing including javascripts files <script type="text/javascript" src="/scripts/jquery.calculation.js"></ script> <script type="text/javascript" src="/scripts/ jquery.calculation.min.js"></script> <script type="text/javascript"> $(document).ready( function (){ // update the plug-in version $("#idPluginVersion").text($.Calculation.version); $("input[name^=sum]").sum("keyup", "#totalSum"); } ); </script> </head> <lift:addition form="POST"> <pre><p>Text1 : <input type="text" align="centre" size="8" id="sum2" name="sum"/>:1</p></pre> ----1 <pre><p>Text2 <input type="text" id = "sum1" name="sum"/>Daltons</p></ pre>-------2 <pre><p>result after addition : <input type="text" id="totalSum" name= "totalsum" readonly="readonly" /></p></pre> ------3 <form:submit><input type="submit"/></form:submit> <</lift:addition> so the above code works but as soon as i bind the line ---1,---2,---3 using <form:text1> for example 1 becomes <pre><p>Text1 : <form:text1> <input type="text" align="centre" size="8" id="sum2" name="sum"/><form:text1/></p></pre> autocalculation part stops working. On Jan 12, 10:31 am, Naftoli Gugenheim <[email protected]> wrote: > Can you fill in some more specifics? > What code do you bind with? > What output do you see in View Source? > > ------------------------------------- > > Madhav<[email protected]> wrote: > > hi all > I am trying to use jquery calculation plugin > (http://www.pengoworks.com/workshop/jquery/calculation/calculation.plu...) > with my lift project. What i am trying to do is to use this plugin to > do mathematical operation like addition,substarction of some > textfields values and display result in readonly text field. When i > run the project everything runs fine without error but autocalculation > part does'nt works. I am binding my field elements like this > < form : ratio>< input type="text" align="centre" size="8" id="sum2" > name="sum"/><form:ratio/> . > Autocalculation part works well when i remove binding > (<form:ratio>,<form:ratio/> ) attribute from the fields . > Any ideas how can i make this work?? > > Madhav > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
-- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
