Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Manipulating JavaScript Arrays

Our first tutorial on JavaScript arrays covered the basics: creating arrays, accessing the contents of arrays, array lengths, and looping through arrays.In this tutorial, you explore arrays in more depth, and learn how to use various methods of the Array object to manipulate arrays.Extracting sections of an array with slice()You're not limited to accessing single array elements at a time. Thanks to the slice() method, you can grab a whole section of an array at once. slice() has the following syntax:arraySlice = array.slice ( begin [, end] )The two parameters, begin and end, work as follows:be...

9,906 0       JAVASCRIPT ARRAY MANIPULATE JOIN SPLICE


  JavaScript: Passing by Value or by Reference

In JavaScript, we have functions and wehave arguments that we pass into those functions. But how JavaScript handleswhat you’re passing in is not always clear. When you start getting intoobject-oriented development, you may find yourself perplexed over why you haveaccess to values sometimes but not other times.When passing in a primitive type variablelike a string or a number, the value is passed in by value. This means that anychanges to that variable while in the function are completely separate fromanything that happens outside the function. Let’s take a look at the followingex...

4,125 1       JAVASCRIPT FUNCTION PASS BY REFERENCE PA


  JavaScript showModalDialog method

In JavaScript, showModalDialog()  method creates a simple modaldialog box which is a simple html page but when a modal dialog opens, user can't switch to another page until it closes the modal dialog box.Syntax:  window.showModalDialog( url, arguments, feature options); Where url is the URL of page which is to be opened in modal window and argumentsare those arguments which we are passing to the modal window and featureoptionsare the attributes set for the modal window.Description of code:Suppose we have an image file and we want to view that particular image fileinto a separat...

10,268 0       JAVASCRIPT JS SHOWMODALDIALOG EXAMPLE


  What is an HTC File?

Question: What is an HTC File?Did you find an HTC file on your computer and wonder what program should open it? Maybe someone emailed you an HTC file but you're not sure how to use it. Perhaps you tried to open the HTC file but Windows told you that it could not open it.Before you can open an HTC file (assuming it's even a file format that's intended to be viewed or edited), you'll need to determine what kind of file the HTC file extension refers to.Answer: A file with the HTC file extension is a HTML Component file.Other types of files may also use the HTC file extension. If you know of any a...

8,110 0       JAVASCRIPT HTC HTML COMPONENT EXTENSION


  JavaScript is now a necessity

I've long looked at JavaScript as a second-class citizen in the programming world. Early on, it was the source of numerous security problems; it was a nice bit of glue to patch together HTML applications with a bit of styling, but nobody would use it for serious code; and so forth. Java, Ruby, Python, they were the languages for doing real work. But my attitude toward JavaScript has changed completely in the past few years. JavaScript has "grown up." I'm sure there are many JavaScript developers who would take issue with that judgement, and argue that JavaScript has been a capable, mature, and...

4,541 0       JAVASCRIPT HTML5 NECESSARY CLIENT LANGUA


  5 Reasons Your Javascript Stinks

Javascript gets a bad rap on the Internet, but there are few languages that are so dynamic, so widespread, and so deeply rooted in our lives as Javascript is. The low barrier of entry leads some people to call it a script kiddie language, others scoff at the concept of a dynamic language while riding their statically typed high horse. You and Javascript just got off on the wrong foot, and now you've made it angry. Here's five reasons why your Javascript code sucks.1. You're not using a namespace.Remember in college when the teacher said you can't use global variables in your homework? Using gl...

3,053 0       PROTOTYPE JAVASCRIPT GOOD HABIT OOP


  Interaction between JavaScript and Frameset

ou want to change more than one frame at a time? OK, well here is how to do make the trick work for you!The first thing you will need is a frameset to get you started. Again, I will use a frameset with two frames. Here is the code for the frameset page:<HTML><HEAD><TITLE>Frames Example 5</TITLE></HEAD><FRAMESET cols=\"20%,80%\"><FRAME SRC=\"page1.htm\" name=\"left_frame\"><FRAME SRC=\"page2.htm\" name=\"right_frame\"></FRAMESET></HTML>Be sure you give each frame a name using the name=\" \" attribute. I named the frames above \"left_fr...

4,105 0       JAVASCRIPT INTERACTION HTML FRAMESET FRA


  Square bracket in checkbox name

0down votefavoritei have a form with checkboxes like this:    <input type=\"checkbox\" name=\"type[]\" value=\"1\" />Fast Food<br>    <input type=\"checkbox\" name=\"type[]\" value=\"2\" />Table Service<br>    <input type=\"checkbox\" name=\"type[]\" value=\"3\" />Cafeteria<br>when i use the brackets in the name (type[]), my php works:    $type=$_POST[\'type\'];    echo \"types are:\";for ( $counter = 0; $counter < sizeof($type); $counter += 1) {    echo \"<br>\".$type[$counter];}but my jav...

5,561 0       PHP SQUARE BRACKET JAVASCRIPT ARRAY OF N