MVC ViewModel not updating with Internet Explorer 11 - asp.net-mvc

I have a simple form that is working just fine with Firefox 26 (latest version as of 12/26/2013) but when I run this form with Internet Explorer 11 I am not seeing the values from my two jQuery autocomplete controls being updated in my ViewModel. All other controls are working just fine. My autocomplete controls are of type but I have several other controls on the form that I have no issues with, just the autocomplete. Are there any known issues with jQuery autocomplete in a ... rendered in IE 11?
I have also tested this with the latest Google Chrome and I have the same issue as IE 11. This only works in Firefox :-( I have no idea why.

I had a similar issue when used IE, because IE cached my request so I did this:
$.ajax({
type: 'GET',
url: 'url',
cache: false,
success: function(response){
/* ... */
}
});
Hope this can help to you.

Related

All Scripts Stop Working After Navigating on Mobile

I'm currently working on a mobile version of a website, the desktop version is working perfectly. On mobile, after the first navigation (random internal page), all jQuery scripts stop working. Even when I navigate back to index, it doesn't execute previously working scripts.
I have included html parts, for example:
$(".header").load("header.html");
And lots of different in-page scripts or slideshows, toggle buttons.
I'm aware of the DOM loading issue, tried all solution, none of them fixed the bug.
So how can I fix this without creating a completely different mobile version of the website?
Try this instead of load().
$(document).ready(function(){
$.ajax( {
url: "header.html",
type: "GET",
cache: false,
success: function(html) {
$(".header").html(html);
}
});
});

Knockout with jquery mobile in Cefsharp

I'm facing an issue in knock out js,
I'm binding the options of the select control from an observabale array,
If the number of options are more, if I click on the select option, jquery mobile design gets hanged.
I'm using cefsharp form loading chrome page inside cefsharp,
The thing is the select feature works fine in chrome browser but not inside cefsharp,
I'm binding to the select control as follows,
Html,
<select name ="name" id = "name" data-bind ="options:namevalues">
Javascript,
<script>
function viewmodel()
{
var self=this;
self.namevalues = ko.observablearray(['abc','bcd']);
//many name values, say 20, it gets hanged inside cefsharp but works fine in chrome, no error console messages
}
Could someone help.
Have you tried loading the chrome dev tools?? It would enable to use breakpoints etc etc - a sane development experience.
in cefSettings:
PackLoadingDisabled=false
then (after the browserInitialised evennt has fired) call
_browser.ShowDevTools();
make sure you ship the 'pak' file in the bin dir (latest nuget version of cefSharp should take care of this in the targets)
then you should see another window open with the dev tools.
Hopefully that'll help diagnose your issue.
I've tried knockout and angular in there and both worked out fine (although angular needed some awkward route work)

mobile joomla and jquery ui conflict

We have a mobile version of our Joomla site using mobile Joomla and everything was working fine until we introduced the jquery UI for the autocompletion functionality into the equation. We now get the following error "Uncaught TypeError: Object 0 has no method 'match'" which after googling seems to indicate it being a conflict between Mobile Joomla and jQuery UI.
We can prove this if we remove the UI it runs fine again.
Any help would really be appreciated.
Thanks
Richard
Use $.noConflict(); and inside (document).ready(function() put $ inside (function()
Example:
$.noConflict();
jQuery(document).ready(function($){
$("button").click(function(){
$("p").text("jQuery is still working!");
});
});

jquery mobiscroll and jquery validate won't play nice together

i'm working on a jquery mobile web site. and am trying to use the mobiscroll plugin for the date picker.
I'm using jquery validate plugin for my validation. I've used this all over other projects with no problems at all.
The issue is, the mobiscroll modal popup comes up, and the set / cancel button works fine, but the scrolling and/or +/- buttons do not function.
firebug isn't showing any errors, and IE Developer tools script debugger doesn't either.
If i take the jquery Validate reference out, it works fine. removing the $('form').validate(); does NOT fix it.
for reference i'm using:
jquery 1.7.1
jquery mobile 1.1.0
jquery validate 1.6
mobiscroll 1.6 or 2rc2 (both have the issue)
How i have mobiscroll configured doesn't seem to matter, leaving all the options out, or setting some doesn't seem to make a difference.
Having other inputs with or without validation on them doesn't make a difference either.
Here is my setup code:
$('#DateVolunteered').scroller(
{
preset: 'date',
theme: 'default',
display: 'modal',
mode: 'scroller'
}
);
and the input:
I tried making a jsFiddle, but am having some issues with getting the various libraries referenced and all the css and whatnot. I will keep working on it and post a link when i get it up and running.
EDIT:
I can't get a fiddle to work. BUT I have discovered that updating to 1.9 fixes it. very strange. but i'll take it
updating to jquery validate 1.9 fixed it.

Why is JQuery mobile not working in Internet Explorer?

For some reason, JQuery mobile is not rendering in Internet Explorer 9 on my website - http://dev.eventhello.com/users/login. I tried it in compatibility mode and it still doesn't work.
Any ideas as to why it works in Firefox, Safari, and Chrome, but not in Internet Explorer?
You have Uncaught SyntaxError: Unexpected token } on line 33 of login page source. This results in javascript exception in IE which may stop the page from rendering.
Can you try adding empty string as initial source value:
$( "#EventCity" ).autocomplete({
source: "" });
The issue was that there was a bug with JQuery version 1.5 so I updated. More details can be seen at jQuery Templates not working in IE9 RC

Resources