Click here to Skip to main content
15,881,709 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 6:52
Member 1480782320-Apr-20 6:52 
GeneralRe: using javascript geoplugin to geolocalize Pin
ZurdoDev20-Apr-20 7:08
professionalZurdoDev20-Apr-20 7:08 
GeneralRe: using javascript geoplugin to geolocalize Pin
Member 1480782320-Apr-20 7:43
Member 1480782320-Apr-20 7:43 
AnswerRe: using javascript geoplugin to geolocalize Pin
layarfilm215-May-20 3:01
layarfilm215-May-20 3:01 
QuestionSuper simple for everyone else... Pin
JaHowler17-Apr-20 12:49
JaHowler17-Apr-20 12:49 
AnswerRe: Super simple for everyone else... Pin
Jin Vincent Necesario17-Apr-20 19:35
professionalJin Vincent Necesario17-Apr-20 19:35 
GeneralRe: Super simple for everyone else... Pin
JaHowler18-Apr-20 8:24
JaHowler18-Apr-20 8:24 
AnswerRe: Super simple for everyone else... Pin
Richard Deeming20-Apr-20 0:44
mveRichard Deeming20-Apr-20 0:44 
QuestionClick ok button in alert then chaining methods. Pin
Member 1265872416-Apr-20 12:00
Member 1265872416-Apr-20 12:00 
AnswerRe: Click ok button in alert then chaining methods. Pin
Richard Deeming17-Apr-20 4:00
mveRichard Deeming17-Apr-20 4:00 
Questionwhat is javascript and what can I make with it? Pin
Rapid Spray16-Apr-20 1:00
professionalRapid Spray16-Apr-20 1:00 
AnswerRe: what is javascript and what can I make with it? Pin
dioscarey17-Apr-20 7:11
dioscarey17-Apr-20 7:11 
QuestionHow to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 1:29
Member 1451287515-Apr-20 1:29 
QuestionRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 1:52
mveRichard MacCutchan15-Apr-20 1:52 
AnswerRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:20
Member 1451287515-Apr-20 2:20 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 2:29
mveRichard MacCutchan15-Apr-20 2:29 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:32
Member 1451287515-Apr-20 2:32 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 2:40
mveRichard MacCutchan15-Apr-20 2:40 
GeneralRe: How to use Open Street map or any other Map Offline with web application Pin
Member 1451287515-Apr-20 2:48
Member 1451287515-Apr-20 2:48 
QuestionRe: How to use Open Street map or any other Map Offline with web application Pin
Richard MacCutchan15-Apr-20 3:06
mveRichard MacCutchan15-Apr-20 3:06 
QuestionHow to read Doc or Pdf file using javascript or jquery Pin
Member 1261817013-Apr-20 23:05
Member 1261817013-Apr-20 23:05 
QuestionRead email from outlook and display on website javascripts Pin
Member 147950937-Apr-20 3:31
Member 147950937-Apr-20 3:31 
AnswerRe: Read email from outlook and display on website javascripts Pin
Richard Deeming7-Apr-20 3:45
mveRichard Deeming7-Apr-20 3:45 
Question./watch is compiling the JS library files mostly but one file it is always caching Pin
simpledeveloper11-Mar-20 6:51
simpledeveloper11-Mar-20 6:51 
Hi All I am using Ember even though I am making changes but when I run the ./watch its not producing the JavaScript file with new code - its annoying - I am making the manual change but that's not correct solution right? I made the change to the file even by opening in folder and manually updated the code on ember file - still its writing the old code in app.js file. What could be the reason I don't know. I am using Web Pack to run ./watch and generate the app.js file
Here is my Ember js code:
export default () => { 
 IMS.registerController("case.details.assignedinspector.edit", {

    caseDetails: Ember.inject.controller('caseDetails'),
    caseId: Ember.computed.alias('caseDetails.model.imscase.id'),
    clearForm: function () {
        $('.modal').modal('hide');
    },
    actions: {
        close: function (id) {
            $('.modal').modal('hide');
            this.transitionToRoute('case.details');
        },

        async save() {
            var scope = this;

            //validating form
            if ($("#edit-assignedinspector-form").validate()) {
                var data = {                    
                    AssignedToInvestigators: Ember.get(scope, 'model.imscase.assignedToInvestigators'), //AssignedToInspectorId: $("#assignedInspectorSelect").chosen().val(),
                    CaseId: this.get('caseId')
                };
                try {
                    let response = await this.api('Case/UpdateAssignedInvestigators').post(data);
                    $('.modal').modal('hide');
                    toastr.success("Assigned Inspector Edit Saved.");
                    scope.transitionToRoute("case.details");
                    scope.get('caseDetails').refreshData();
                    scope.clearForm();
                } catch (ex) {
                    toastr.error("Error saving Assigned Inspector.");
                }
            }
            else {
                toastr.warning("Please fix the form", "Validation failed");
            }
        },
        didInsert: function () {
            $('#edit-assignedinspector-modal').modal();
        }
    }
}); 
 }

Here is how its generating the old code in app.js file - any help please?
save: function () {
  var _save = _asyncToGenerator(
  /*#__PURE__*/
  regeneratorRuntime.mark(function _callee() {
    var scope, data, response;
    return regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            scope = this; //validating form

            if (!$("#edit-assignedinspector-form").validate()) {
              _context.next = 19;
              break;
            }

            data = {
              AssignedToInspectorId: $("#assignedInspectorSelect").chosen().val(),
              CaseId: this.get('caseId')
            };
            _context.prev = 3;
            _context.next = 6;
            return this.api('Case/UpdateAssignedInspector').post(data);

          case 6:
            response = _context.sent;
            $('.modal').modal('hide');
            toastr.success("Assigned Inspector Edit Saved.");
            scope.transitionToRoute("case.details");
            scope.get('caseDetails').refreshData();
            scope.clearForm();
            _context.next = 17;
            break;

          case 14:
            _context.prev = 14;
            _context.t0 = _context["catch"](3);
            toastr.error("Error saving Assigned Inspector.");

          case 17:
            _context.next = 20;
            break;

          case 19:
            toastr.warning("Please fix the form", "Validation failed");

          case 20:
          case "end":
            return _context.stop();
        }
      }
    }, _callee, this, [[3, 14]]);
  }));

  function save() {
    return _save.apply(this, arguments);
  }

  return save;
}()

It is supposed to call Case/UpdateAssignedInvestigators instead its still calling the Case/UpdateAssignedInspector, which is incorrect.
Any help would be very very helpful - a link, a suggestion or even a code snippet anything helps thanks in advance.

modified 11-Mar-20 15:09pm.

QuestionHow can I get an input value from ajax result search Pin
vlafratta4-Mar-20 4:45
vlafratta4-Mar-20 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.