I think with an import net.liftweb.http.js._ import JsCmds._
the compile problem should go away as there is an implicit defined there. But this is not important. Can you send a minimalistic code example that reflects the problem? ... including the template and Scala code. Br's, Marius On Oct 19, 9:48 pm, caw1461 <caw1...@gmail.com> wrote: > My saveClaimSatus("") function saves the passed value to the > database. > Firebug is not giving me any errors and prints the line to the > console. > > The order in which the two updates happen is important because I need > the status updated before the form is saved. > > I am using two different versions of saving to keep a temporary "save" > and then a finalized "For Publish" version. > > so I need both of them to save the form, which i was trying to use the > saveFunc to do. > > and removing the .cmd seems to give a syntax errors: > > E:\patentTracker3\prospective_claims_ver_br\patentTrackerUi\src\main > \scala\com\trlr\binpr\snippet\Workflow.scala:473: error: overloaded > method value ajaxButton with alternatives (String,() => > net.liftweb.http.js.JsCmd,(String, String)*)scala.xml.Elem <and> > (scala.xml.NodeSeq,() => net.liftweb.http.js.JsCmd,(String, String)*) > scala.xml.Elem cannot be applied to (java.lang.String,() => > net.liftweb.http.js.JE.JsRaw,(java.lang.String, java.lang.String), > (java.lang.String, java.lang.String),(java.lang.String, > java.lang.String)) > "save1" -> SHtml.ajaxButton( > > On Oct 19, 2:20 pm, Marius <marius.dan...@gmail.com> wrote: > > > I think you can simply return JsRaw("$.saveFunc();") without using > > JsRaw("$.saveFunc();").cmd > > > Do you see any errors in the browser? ... try using firebug addon in > > firefox and see if it complains about anything. What does > > saveClaimStatus("EDITED") do? > > > Regarding "I'm just trying to run ajavascriptfunction followed by my > > saveClaimStatus("EDITED") function. " ... when you press thebutton > > thatajaxfunction on the server side gets executed and it returns > > aJavaScriptback to browser where $.saveFunc() suppose to be executed. > > In your code saveClaimStatus is run before running $saveFunc() in the > > case of the save1buttonwhich seems to be the other way around. What > > is your actual use case? > > > Br's, > > Marius > > > On Oct 19, 8:29 pm, caw1461 <caw1...@gmail.com> wrote: > > > > I figured this was a simple problem, but have spent way too much time > > > on this issue. > > > > $.saveFunc = function() { saveT(); }; > > > > function saveT () { > > > print("save function executing") > > > tinyMCE.activeEditor.save() > > > print("save completed") > > > }; > > > > <buttonid="Save" onclick="saveT()" class="ui-state-default" > > > title="Save, only save the html, doesn't mark the claim ready for > > > publishging.">Save</button> > > > > as a purejavascript/html, this works as intended, thebuttonsaves/ > > > submits the form. > > > > "save1" -> SHtml.ajaxButton( > > > "Fixed", > > > { > > > () => { > > > println("Jenn is on crack."); > > > saveClaimStatus("EDITED") > > > JsRaw("$.saveFunc();").cmd; > > > } > > > }, ("class", "ui-state-default "), ("title", "Save and > > > marks the claim ready for publishing."), ("id", "fixed")), > > > "save2" -> SHtml.ajaxButton( > > > "yes", > > > () => {println("Rhode Island Destroyed") > > > JsRaw("$.saveFunc();").cmd}) > > > > I used your example in the other thread about ajaxbutton and > > >javascript, but I can't get the functionality I am looking for. > > > > save2 is just a testbuttonto check functionality. It does run the > > > println, but it does not run the saveT function. > > > > 13:19:17.725 [29569...@qtp-6966554-8] DEBUG comet_trace.debug:82 - > > >AJAXRequest: 182kyt8t8rjdz Map(F527240256671NZ2 -> List(true)) > > > Rhode Island Destroyed > > > 13:19:17.725 [29569...@qtp-6966554-8] DEBUG comet_trace.debug:82 - > > >AJAXResponse: 182kyt8t8rjdz InMemoryResponse( > > > $.saveFunc();;, List((Content-Length,15), (Content-Type,text/ > > >javascript; charset=utf-8)), List(), 200) > > > > I'm just trying to run ajavascriptfunction followed by my > > > saveClaimStatus("EDITED") function. > > > > I just think i'm either not going about this correctly or not > > > understanding my problem correctly. > > > > Any help would be a godsend. > > > > Thanks, > > > > Christopher --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---