JQuery

6 posts

How to fix problems with missing form values on jquery serialization

So – I was toiling away on some client side code, and noticed that a dropdown value was not being sent on a post command.  After much rending of garments and gnashing of teeth I figured it out.  I was setting the value with a .val(“something” command) – then doing the post.  It would seem […]

How to fix an odd problem with autonumeric.js

So, you’re using the standard autonumeric.js jquery plugin on your html 5 site – you set up the initialization properties and nothing happens – what is wrong? First check to make sure that your textbox is of type “text” and not type “number” – that threw me for about ten minutes today.

How to fix problems with Jquery Validate and dynamically generated forms

I recently came across the problem of validating dynamically generated forms with the jquery.validate plugin – everything worked well with the original form, but when there were multiple forms available I got peculiar syntax errors. A quick googling told me to simply add the following code $(“form”).validate(); to the javascript and everything would be fine. […]

When the jquery $.post doesn’t work the way you expect it to…

The Problem In my was posting a contact form to an outside service, and then redirecting to a page on the same site.  I thought, Aha, I will use the handy jquery .post command – it looked something like this. $.post(“https://www.outsidesite.com/FormSubmit.php”, $(“#myform”).serialize()); window.location.href=’https://www.MySite.com/SomePage/’; But curiously, half of the time I filled out the form the […]

Which jQuery cropping plugin should you use?

I recently had the need to do some automated image cropping.  I was already using the wonderful ImageResizing.Net plugin, which made all of the server code very easy.  It came with some sample code that uses the JCrop plugin (by Deep Liquid). Jcrop does it’s job very well.  However… In the modern web development environment, […]

How to fix problems with asp.net mvc 3 and jQuery UI AutoComplete

The Problem: You’re tooling along, using the jQuery library to write some great search feature, and you write some great Linq to Sql code.  Being an awesome coder your use the extension method syntax.  Your action result (in the appropriate controller) looks like this public ActionResult QuickSearch(string term) { var lst = context.Contacts.Select(xx => new […]