A Simple Prompt Modal Dialog for JQuery JavaScript

image.png

Do you hate what the basic alert(‘hello there’) looks like in JavaScript to your viewing public?  All I want is a simple modal prompt dialog that works with JQuery.   For a long time, I’ve been looking for a simple to use replacement.  It seems like when I scour the internet, I run into lots of people telling you simple ways to use JQueryUI’s Dialog.  For example, when you search “jquery alert simple” you get tons of hits.  This one: http://stackoverflow.com/questions/5355178/jquery-ui-dialog-on-the-fly-without-div It seems the highest voted one says do this: $("<div>My div content</div>").dialog(); Way down in the comments of the SO post, zod posts “What about prompt” with a links … Continue Reading

In JavaScript, ‘true’ == true is false, truthy truth

Somehow, I had thought that in JavaScript that if I said ‘true’ == true that a string conversion to bool would happen on the left side of the comparator and that the == instead of the truthy === would do a type conversion for me. Apparently not. So, for now on, all my JavaScript will look like this when I’m saving off a boolean that I collect in string form. var donationConfirmed = $('#RegisterUserInfoLoggedIn_DonationConfirmed'). val().toLowerCase() === "true"; Happy to hear why I’m wrong here but I don’t think I am. … Continue Reading

Move Existing NodeJS Site To Windows Azure Websites

image.png

Background Mr Glen Block (formerly of Microsoft) has really good video he did while at the Sencha Conference in 2013 in Orlando on how to work with NodeJS as an Azure Web Site.  Azure Websites are a great way to easily spin up low cost web sites that can scale in a big way.  I will not go into all the details of the setup but will fork part of his discussion on how to take an existing azure web site and push it to node.  There are a couple interesting differences in my discussion that are particularly useful.   The value add here is I’m assuming you already have a Git repository For your node project that does not have the root as the NodeJS directory.  That is, in Glen’s talk he assume you are starting a node project from … Continue Reading

ExtJS Not Using autoLoad Best Practice

The typical usage pattern in Sencha’s ExtJS for loading data into a visual control such as a grid is to assign a grid to a store, then let the store have autoLoad: true which means that when the store is created, it will automatically be loaded and since it is assigned to a visual control (grid), the grid will be populated.  I don’t like that pattern.  I like to be more in control.  There may be things I want to do before the grid is loaded. So, what I do is in the application launch event I load my store first and in my store itself, I explicitly tell it not to autoLoad by setting autoLoad to false.  Below is an example of the code I’m using at the moment to handle this.  Notice that I cleverly show a load mask … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: