I'm trying to devise a (good) way to choose a random number from a range of possible numbers where each number in the range is given a weight.  To put it simply:  given the range of numbers (0,1,2) choose a number where 0 has an 80% probability...
I am using Dojo 1.9 with Grails 2.3.9.  The Dojo NumberTextBox widget - that I use in my forms - sets real number values (e.g.: 12.56) in a fixed format (the JavaScript base format) into the HTML form input fields (but displays/edits them according t...
Here's what I'm looking for:   I want to use the wonderful features of SIMPLE mode minification while disabling just one specific feature (disable local function inline).      UPDATE: The answer is NO, it's not possible given my setup. Bu...
I am working with dates that are on an API response. Date coming from API are in EST. I need to convert the EST (technically EDT) date to UTC and then compare with dates from another API response whose values are in UTC format  I am trying to do this...
I need to manage a groovy list object in my javascript function. I have a groovy block into a javascript function.  I tried with this:  var obj = ${mediaObjectInstanceList as grails.converters.JSON}[index];   and this:  var obj = ${mediaObjectInstanc...
Would like to pass directly from the controller to a JavaScript file.   TestControler.groovy  def list() {     render (view: "list", model:[theId: theId]) }   Test.js  function test() {    // do smth with theId }   Found solution have the ren...
Using groovy , you can run closure  like following :     instanceB.methodB({           methodA(3);           methodA(3);   });    //---- methodB definition    class B{        def methodB(Closure c){              c.delegate=new A(); //!!!---The questi...
I am really new to javascript and jquery. I wanted to get the value of the date selected by the user via datepicker, and use the value in my javascript. The name of my datepicker is birthDate. This is my html code for the date picker:         <gui...
i have a problem with this each loop  i have a select, you choose an option, press a button and the selected value is beamed via ajax as encodeURIcomponent to the backend, the answer updates this ul :  <g:each in="${items}"> <li clas...
I have a javascript function (very big one!) that I need its functionality in a Java (Groovy) class. It is a simple calendar converter. I can rewrite it in groovy but just want to know if it is possible to call javascript function from a java (groovy...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.