Category: Web Development

Jul 16

JavaScript by Example

JavaScript by Example: Example 1.1 A si mple JavaScript program Run View Source Example 1.2 An HTML form with a JavaScript event handler defined Run View Source Example 1.3 Estimating Your Taxes with JavaScript Run View Source Example 6.1 Defining JavaScript Functions View Source Example 6.2 Using Functions as Data View Source Example 6.3 Checking …

Continue reading

Jul 15

Some JavaScript stuff that you need to know

What you really need to learn in Javascript? 1. Where you can place JavaScript codes? Anywhere in the web-pages, ideally in the header section, or in an external file. If you keep javascript codes in an external file, the codes will be re-usable from different web-pages 2. Some basic programming: <script language=”javascript” type=”text/javascript”> </script> <script …

Continue reading

Jul 10

How to implement multiple tab webpages in Ajax and JavaScript

The following two examples will demonstrate how to use JavaScript and/or ajax to implement mult iple tab webpages. http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ http://www.barelyfitz.com/projects/tabber/example2.html I have used the first code extensively in one of my applications. The basic ides is: you define a div section. On each click, you change the contents of that div section using Ajax concepts. …

Continue reading

Jul 09

JavaScript: Pass by Value: Pass by Reference

JavaScript: Pass by Value: Pass by Reference

Jul 09

Handling Checkbox arrays with Javascript::GetElementsByName:XHTML supported

The following code demonstrates how to handle checkboxes with JavaScript. Note the names of all c heck boxes are same myInput[]. It could also be myInput. Both works as an array to contain the controls’ values. I prefer myInput[] as you can handle this control in PHP as an array. If you use $arr=$_POST[‘myInput’], $arr …

Continue reading

Jul 09

JavaScript – Form validation

The code will be helpful in validating data entry forms such as: user registration, user creati on. validate_required is used by all other functions function validate_required(field,alerttxt) { with (field) { if (value==null||value==”) { alert(alerttxt);return false } else {return true} } } function validateTicketCreateForm(thisform) { with (thisform) { if (validate_required(type,’Type must be filled out!’)==false) {type.focus();return false} …

Continue reading

Jul 09

JavaScript – Miscellaneous Validations

function validateDomainName(strValue) { return /www\.[a-z0-9_\-]+\.[a-z]{2, 3}/ig.test(strValue); } function validateDomainName(strValue) { return /www\.[a-z0-9_\-]+\.[a-z]{2, 3}/ig.test(strValue); } //not 100% right, will fix later function checkDateFormat() { var pattern = new RegExp(0|1[0-9]/[0-3][0-9]/[0-9][0-9]); if(document.getElementById(‘timestampStarted’).value.match(pattern)) { var date_array = document.getElementById(‘timestampStarted’).value.split(‘/’); var month = date_array[0]; var day = date_array[1]; var year = date_array[2]; // This instruction will create a date object source_date …

Continue reading

Jul 09

JavaScript Codes

JavaScript is a very powerful scripting language for web-site development. Also, it is in much demand. var serviceInstancesArrAtLoad = Array(); var serviceInstancesArrAtSubmit = Array(); var tempArr=Array(); function validate_required(field,alerttxt) { with (field) { if (value==null||value==”) { alert(alerttxt);return false } else {return true} } } function validateTicketCreateForm(thisform) { with (thisform) { if (validate_required(type,’Type must be filled out!’)== …

Continue reading

Jul 09

JavaScript Frameworks

The following web-resources discuss some JavaScript Frameworks. Comparisons among the frameworks can also be found. Discussion on the best JavaScript Framework Google Web Toolkit (GWT) DOJO: Home Page JQuery Dojo in Wikipedia Comparison of JavaScript frameworks A Book on DOJO Install DOJO DOJO Hello World Application

Jul 07

JavaScript Miscellaneous Topics

JavaScript Miscellaneous Topics. Please check below. Detect browser name and version: var browser=navigator.appName; var b_version=navigator.appVersion; Note: this was originally written long back – in recent times (2014 – 2016), I used a JS library DetectBrowser for the purpose. http://stackoverflow.com/questions/18970349/detect-chrome-and-safari-in-javascript apparently, this is the one Other browser related: navigator.appCodeName navigator.platform navigator.platform navigator.cookieEnabled navigator.userAgent navigator.appMinorVersion navigator.cpuClass navigator.onLine navigator.browserLanguage …

Continue reading

Jul 03

Random Notes on JavaScript/HTML

This short-note will make sense, only if you had some familiarity with JavaScript in the past and are not using JS for sometimes. This can be used – just to refresh your memory, once in a while. How to embed applet in JavaScript code: <applet align=”alignment” code=”class file name” name=”value” height=”value” width=”value”> <param name=”name of the …

Continue reading

Jul 02

Projectors

  2800 lumnen 519 1280×800 http://www.amazon.ca/dp/B009LIPAN4 3000 520 http://www.amazon.ca/Benq-MX520-Lumen-SmartEco-Projector/dp/B00A16VFOS/ref=sr_1_48?s=electronics&ie=UTF8&qid=1387943199&sr=1-48&keywords=BenQ 3000 521 3d http://www.amazon.ca/MS521-SVGA-LUMENS-READY-SMART/dp/B00G87AW3E/ref=sr_1_16?s=office&ie=UTF8&qid=1387943577&sr=1-16&keywords=BenQ http://www.projectorreviews.com/viewsonic/viewsonic-pjd5533w-dlp-multimedia-projector-review/ http://www.projectorreviews.com/sanyo/sanyo-plc-xd2200-lcd-multimedia-projector-review/  In 2013, the first entry level 1080p (or WUXGA) resolution projectors have come down well below $1000.   – See more at: http://www.projectorreviews.com/projector-categories/classroom-projectors/#sthash.srkXrMqn.dpuf 2800 lumnen 519 1280×800 3000 520 3000 521 3d  In 2013, the first entry level 1080p (or …

Continue reading

Jul 02

DotNetNuke ErrorPages.aspx

<%@ Page Language=”C#” AutoEventWireup=”false” Inherits=”DotNetNuke.Services.Exceptions.ErrorPage” CodeFile=”ErrorPage.aspx.cs” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” lang=”en-US”> <head> <meta name=”revisit-after” content=”1 days” /> <meta name=”robots” content=”noindex,nofollow” /> <title runat=”server” id=”Title”>Error</title> <link id=”DefaultStylesheet” runat=”server” rel=”stylesheet” type=”text/css” href=”~/Portals/_default/default.css” /> <link id=”InstallStylesheet” runat=”server” rel=”stylesheet” type=”text/css” href=”~/Install/install.css” /> </head> <body> <form id=”Form” runat=”server”> <table cellspacing=”5″ cellpadding=”5″ border=”0″> <tr> …

Continue reading

Oct 30

Introduction to Drupal based Web site Development

Oct 20

Installing JBOSS Tools in Eclipse

Oct 17

part 2 how to build a simple website from scratch

Oct 17

how to build a simple website from scratch

Oct 09

Step 1 step by step eCommerce application development

Aug 08

On Web Content Accessibility Guidelines: Why, When, Who, and How

On Web Content Accessibility Guidelines Web Content Accessibility Guidelines. Make your web-content more accessible.   Who need to implement this: Please check at: http://www.mcss.gov.on.ca/en/mcss/programs/accessibility/info_sheets/info_comm/website.aspx   Government of Ontario and the Legislative Assembly Public sector organizations, businesses and non-profit organizations (50+ staff)   How to? Follow the following principles and guidelines. Also, please check the resources as …

Continue reading

Jun 04

Frontend, BackEnd, C#, WebService, Exporting Image and Data To Excel

Was trying to use http://excelbuilderjs.com/ to export image and data to excel from a UI; the UI already uses a service to render a chart ,and displays data on the screen. Just trying to utilize this Excelbuilder tool to export these chart and data to an excel file. Already the processing is done and the stuff …

Continue reading

Feb 13

jQuery Data Table Plugin

Here it is http://www.datatables.net/ It’s pretty useful and it can save you a lot of time. if you want to implement all of these features on your own – it will take a lot of your time. Hence, using such components make sense, some times, many times. However, do not get into/start software/web development by …

Continue reading

Dec 30

Using Rich Text Box Control from Kendo UI

Kendo UI Rich Textbox Control: http://docs.telerik.com/kendo-ui/api/javascript/ui/editor Yes, I used this in real projects. The following code will create a Rich Textbox Control (http://docs.telerik.com/kendo-ui/api/javascript/ui/editor). To customize the control, what buttons should appear on the toolbar, you can use the following instead of   //with all buttons $(“#editor”).kendoEditor(); });   //with selected buttons $(“#topEditor”).kendoEditor({ tools: [ “bold”, …

Continue reading

Dec 28

Part-1: JQuery Mobile in Brief

jQuery mobile is an extension of jQuery to create web-sites or web-applications addressing mobile platforms. Sites or web-applications using jQuery Mobile will work on most mobile devices such as smart phones and tablets (iOs, Android, BlackBerry, Windows Phone, palm WebOs, and Symbian). Applications written in jQuery will look the same in all mobile devices though …

Continue reading

Dec 10

Detecting Your Browser and Browser Version

$.browser was deprecated in JQuery version 1.3, and got removed in 1.9 — I checked the most voted script here, seemed to be working: http://stackoverflow.com/questions/13478303/correct-way-to-use-modernizr-to-detect-ie Place the code in a file (html) and put the starting and ending script tag. Then open the file in browsers. — Before showing the code, I can refer you to another …

Continue reading

Dec 07

Check File Type and Also Check File Size using JQuery

Nov 18

3rd part write a c# tool to create HTML to PDF

3rd part write c sharp tool to create HTML/CSS to pdf

Nov 09

Some Best/Good Practices for CSS

Some Best/Good Practices for CSS Use a CSS framework such as Less The advantage – programmatic approach Easy to change at run time CSS can also be made dynamic Table is old fashioned Apply CSS on DIVs to get the structure Using few images is also a good idea (do not use an image for …

Continue reading

Nov 09

CSS Reusability

Decouple Your CSS From HTML With Reusable Modules <button class=”button” type=”button”>Button</button> <button class=”button-large” type=”button”>Large Button</button> <button class=”button-large-primary” type=”button”>Large Primary Button</button> The styles for these buttons can be defined as follows in Sass: it’s a good style (than applying CSS classes like .button .large, .button .small) .button { // Styles for a button } .button-large { …

Continue reading

Nov 09

What Does Good CSS Mean?

What Does Good CSS Mean? (Relates to CSS Architecture) Good CSS needs to be Predictable Reusable Maintainable, and Scalable   What do these terms indicate? Predictable: Your CSS should not accidentally change the site partially or as a whole (when at a later time the site structure changes) Reusable: CSS rules need to be able to …

Continue reading

Nov 09

Examples: BAD CSS

Case 1: Bad as depends on HTML Structure too much #main-nav ul li ul li div { } #content article h1:first-child { } #sidebar > div > h3 + p { } Case 2: .widget { background: yellow; border: 1px solid black; color: black; width: 50%; } #sidebar .widget { width: 200px; } body.homepage .widget …

Continue reading

Skip to toolbar