Welcome to dingobytes!

Long ago in a web far far away, Dingobytes.com was created to offer service to a special Niche of businesses. After a few years of blood, sweat and tears, the venture disappeared and the domain was lost. After squatters found this domain useless, it was purchased for sentimental reasons and is now the home to tips and tricks for developers, admins and designers.

  • Links

  • Categories

  • Meta

  • Archives

  • SHOW / HIDE NAVIGATION

    My JavaScript Tool Kit

    I have put together a “tool” kit of sorts to help anyone who is just starting out with scripting with javascript. I used javascript sparingly the first few years that I was scripting web applications and sites and it wasn’t until the last year that I really became infatuated with the scripting language.

    My understanding of javascript has increased as I have scoured google.com looking for functions and frameworks to fulfill my page or project needs, but I still feel there is a lot more to learn. I have decided to create this list to help anyone who might just be starting out and needs some direction. Read More

    showMessage

    Having to mess with forms all the time, I was beginning to go crazy tweeking different messages. One for success, one for failure, one for help, etc.

    I decided to try to combine some css with some javascript to make a nice reusable piece to display my form messages. Here is the fruit of that labor.

    The function is going to take three arguments. The first argument is a message and or list of messages. The second is the id of the node you would like to stick the message before. The last argument is a classname.

    Read More

    So at work today, I wanted to see if I could create a lame mouse over effect to let feel like they were highlighting a listing. I wanted to pop out the moused over listing on the page by putting a thin border around the moused over div and then change the background. I was able to create the effect with javascript and coldfusion very easily. Because I don’t host this site on a coldfusion server, I will just show the javascript with some rendered HTML.

    Read More

    Form Validation II

    Continuing on from the first part of the tutorial, we are going to continue through the list of form elements in the order we setup. Next we work on the email address.

    else if(document.getElementById("email").value=='' ||
    (
    document.getElementById("email").value!='' &&
    !
    emailfilter.test(document.getElementById("email").value))){
    document.getElementById("error_msg").childNodes[0].data=
    'Please enter a valid e-mail address.';
    document.getElementById("error_msg").style.display = "block";
    document.getElementById("email").focus();
    return false;
    }

    Notice how we handle the email value checking first to see if it is empty to trigger an error and then using the logical operator OR (denoted as ||), we then look at another statement. In that statement we use the logical operator AND (denoted as &&) to trigger an error, and if both the email filed is not empty and the emailfilter.test is not valid then we do what is in between the curly brackets again. The contents are the same as what we described in the first statement.

    Read More

    The more we learn the more fun we have. Take for example the simple process of validating a form. We can save the user a lot of time validating the form on the client side and still do it without those annoying alerts that pop up with a loud DING! It is rather easy with the help of a little javascript.

    Now depending on what type of data you are passing to the server with your form, you will often need to also validate your fields data on the server too. This tutorial will only look at the client side validation, leaving server side validation to another tutorial at some other time.

    Lets first start with our form. We are going to do a simple form that just asks for name, email address, optional phone number, a select list for subject and text area for message. Oh, I always forget, we need a submit and clear button too. Lets start it all of with our form tag.

    Read More