Question

In my Single Page App, I use Durandal and knockout. I have a simple input box. That input box shows up fine in Chrome, NOT in IE 8. Any idea why?

view-

                    <b>Client Name:</b><input data-bind="value: clientName" />
                        <a title="Search for Client." data-bind="    click: SearchClients" class="btn btn-mini" style="vertical-align: top; line-height: 27px; font-size: 11px">Search  </a>

viewmodel-

 define(['services/logger', 'durandal/system', 'plugins/router', 'services/CertificateDataService', 'controls/Lucas', 'services/ErrorLoggingDataService'],
function (logger, system, router, CertificateDataService, Lucas, ErrorLoggingDataService) {
    var vm = {
    activate: activate,
    title: 'Client Search',
    clientName: ko.observable(''),
    selectClient: function (tab) {
        try {
            alert('here');
        }
        catch (err) {
            //var err = eval("(" + err.message + ")");
            amplify.store("ErrorDetails", err.message + ", vm selectTab function");
            ErrorLoggingDataService.LogErrorSvc(err);
        }

    },
    SearchClients: function (tab) {
        try {
            alert(tab);
        }
        catch (err) {
            //var err = eval("(" + err.message + ")");
            amplify.store("ErrorDetails", err.message + ", vm selectTab function");
            ErrorLoggingDataService.LogErrorSvc(err);
        }

    },
};

return vm;

function activate() {
    return true;
}
});
Was it helpful?

Solution 2

Our graphics designer had put display: none for input style. Not being aware of that I thought it was a problem with IE 8. Not the case. Simple style issue.

OTHER TIPS

IE8 is sensitive to trailing commas. Towards the bottom when you're done defining the SearchClients method, you have a }, that should only be a }

BTW, if everything after var vm = { down to just before the last line was indented one more tab, it would be easier to see what the open/close curly braces belong to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top