Issue with customized js

We have created a custom login page with user name, password and project. Drop-down option to select project which is stored in session variable.
Now we have to change project without logging out the user. So we created a custom js in project which is stored in js folder.
On clicking on CHANGE PROJECT option, it will open a window showing project list in drop down as shown in image attached.
Now we found 2 issues in this.
ISSUE 1 : This process is working fine when we browse the project using Code On Time or Visual Studio. But when we deploy this on web server this is not working.
ISSUE 2 : As the project is created in Touch UI, we tried browsing this on android phones, then the option CHANGE PROJECT is not clickable.

We are using Code On Time Version 8.7.6

2 people have
this question
+1
Reply
  • (function () {
    window.onload = function () {
    $(".app-menu-strip").append("Change Project");
    //$(".ui-btn-right.app-btn.ui-btn.ui-btn-icon-notext.ui-shadow.ui-corner-all.app-avatar").before("Test");
    }

    })();
    function projectPage() {
    var _app = $app
    var mobile = _app.touch = _app.mobile = new Web.Mobile();
    _app.alert = function (message, callback) {
    return showConfirmation({ name: '_alert', message: message, /*icon: 'info-outline', */submit: callback, cancel: false });
    };
    function getdata() {
    var project=$("#login-project").val();
    $.ajax({
    async: true,
    type: "POST",
    url: "/test.aspx/SetSession",
    data: '{"project":"' + project + '"}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (r) {
    $.ajax({
    async: true,
    type: "POST",
    url: "/test.aspx/GetSession",
    data: '{}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (r) {
    alert("Success"+r.d);
    },
    failure: function (response) {
    alert(response.d);
    },
    error: function (response) {
    alert(response.d);
    }
    });
    },
    });
    }
    function showConfirmation(options) {
    var msg = options.message,
    message = msg != null ? msg.toString() : '',
    cancel = options.cancel,
    promise = $.Deferred();

    _app.survey({
    _submit: options.submit,
    _cancel: cancel,
    _promise: promise,
    //text: mobile.appName(),
    controller: options.name,
    questions: [{ name: 'msg__', value: message, text: false, readOnly: true, rows: 3, htmlEncode: !message.match(//) }],
    //tags: 'modal-fit-content modal-always modal-max-xxs promo-none modal-buttons-more-none',// + ' material-icon-' + options.icon,
    options: {
    modal: {
    fitContent: true,
    always: true,
    max: 'xxs',
    buttons: {
    more: false
    }/*,
    gapRequired: true*/
    },
    contentStub: false,
    promo: false
    },
    submit: 'alertconfirmed.app',
    cancel: cancel != false ? 'alertnotconfirmed.app' : cancel,
    layout: '[Message]'
    });
    return promise;
    }
    //debugger;
    var id = '';
    $.ajax({
    async: true,
    type: "POST",
    url: "/Test.aspx/GetUserWiseProject",
    data: '{"UserName":"' + id + '"}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (r) {
    var ddlCustomers = 'Please select project';
    $.each(r.d, function () {
    ddlCustomers += "" + this['Text'] + "";
    });
    var select = " Select Project" + ddlCustomers + "";
    _app.alert(select, function () {getdata(); })
    },
    failure: function (response) {
    alert(response.d);
    },
    error: function (response) {
    alert(response.d);
    }
    });
    };
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • Kedar,

    Your app is combining all *.js files into .a single script. If the script is cached by the browser on any device then your app will behave as it the script if ot present. Make sure to clear the browser cache.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited