Friday, April 29, 2016

Thank you XML and NotePad++

    Use the XML Tools plugin for Notepad++ and then you can Auto-Indent the code with Ctrl + Alt + Shift + B .For the more point-and-click inclined, you could also go to Plugins --> XML Tools --> Pretty Print. Search "XML TOOLS" from the "Available" option then click in install.Jan 28, 2015

    How to indent HTML tags in Notepad++ - Stack Overflow

Windows 7 - Change Login Screen

Reference and Credit -

click start type regedit and hit enter
right click on HKEY_LOCAL_MACHINE and select find 
type OEMBackground and hit enter
(the path should be Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background )
(if it is not there you need to create it*right click on background and select new DWORD name it OEMBackground set it from 0 to 1)
double left click on OEMBackground and change the value from 0 to 1
click start and type %windir%\system32\oobe
in the oobe folder create a folder named info
in that folder create a folder named backgrounds

now rename your picture that you want displayed durning logon/lock screen backgroundDefault.jpg

everything is case sensitive so if you have to copy and paste the names. the picture needs to be under 244kb.

trick to get a picture under the 244kb
right click on the picture and select open with > select paint
press ctrl+w
this will bring up a box under horizontal and vertical select the amount you want to reduce the picture in %


Tuesday, April 19, 2016

Fancybox Modal Window onFocus or $('#ID').onFocus();

How to give focus to a modal window?

Be patient.  Add a timer.  That did it for me.

This was a 2 day R&D problem. After adding the timeout BAM --- Focus achieved.  This really was a tricking thing to figure out, but think about it if the HTML DOM ELEMENT is not there it cannot set focus.

$(document).ready(function setFocus() {
         setTimeout(function () {
         }, 420); // After 420 ms
         return false;

Wednesday, April 13, 2016

BootStrap, JQuery, and JavaScript Validation Oh My... Nice Solution.

You need jQuery library and bootstrap to perform the following code.

Nice Page Header ON TOP

<div id="message">
        <div class="alert alert-danger alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" 
             <span id="alertMsgTxt" style="font-size:1.5em;font-weight:bold" ></span>

Next is the server control or button either one.

<asp:TextBox ID="txtEmailSignup" TextMode="email"  
runat="server" CssClass="form-control"  title="Email Sign Up SHOE SHOW Sales and News" placeholder="Enter your email address" />

Finally the nice jQuery

        $(document).ready(function () {
            $(document).on('click', '#lnkEmailSubmit', function () {
                var emailaddress = '';
                emailaddress = $('#txtEmailSignup').val();
                if(!validateEmail(emailaddress) || emailaddress === ''){
                    window.scrollTo(0, 0);
                    $('#alertMsgTxt').html('Invalid Email, please 

click here
 to try again.');  
        function setFocus() {
        function validateEmail($email) {
            var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
            return emailReg.test( $email );