[Lift] Re: javascript with an ajaxbutton

2009-10-22 Thread caw1461
I don't think i can pull a small example from here because I'm combining my lack of knowledge in scala, lift, html, jquery, tinyMCE ... you get the idea. The point is that I am trying to create a button that calls a scala function and a javascript function. I am currently trying to use an

[Lift] Re: javascript with an ajaxbutton

2009-10-22 Thread Marius
I'm sorry that I haven't had the time to try it out myself yet. If you want the scala function to be called via an Ajax request and after that the Scala function returns the Javascript that calls your JS function, your code looks correct to me. I used this pattern quite a bit with no problems.

[Lift] Re: javascript with an ajaxbutton

2009-10-20 Thread Marius
I was hoping to see something minimalistic and isolated so I can quickly try it out. I'm not sure what you do with redirect(/workflow/claims) but from Ajax function you should probably use JsCmd.RedirectTo .. Hopefully I'll have some time this weekend to play with tinyMCE Br's, Marius On Oct

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread Marius
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 a javascript

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread caw1461
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

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread Marius
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

[Lift] Re: javascript with an ajaxbutton

2009-10-19 Thread caw1461
edit.html: script type=text/javascript tinyMCE.init({ // General options mode : textareas, theme : advanced, plugins :