Recent Notes
Displaying keyword search results 91 - 100
Created by woolf on February 03, 2010 04:39:18
Last update: February 03, 2010 04:39:18
Ways to use JavaScript date function:
// current time
new Date();
new Date(0);...
Created by woolf on February 03, 2010 04:15:33
Last update: February 03, 2010 04:15:33
The replace method for JavaScript strings can either replace a string or a regular expression:
// replace string with string
'ActionScript'.re...
Created by woolf on February 03, 2010 04:02:07
Last update: February 03, 2010 04:03:18
Redirect without delay:
<html>
<body>
<script type="text/javascript...
Redirect with delay:
<html>
<body>
<script type="text/javascript...
Created by Dr. Xi on September 02, 2008 18:55:18
Last update: January 18, 2010 22:36:24
Remember the times when you googled for solutions to your technical problems? How much time did you spend on wading through the zillions of links to find the ones that are of interest to you? Wouldn't you hope that you can find the answer right away the second time around? How many times were you forced to peruse hundreds of pages of documentation for a very specific need? Did you ever need to experiment with various alternatives because the documentation was vague? Wouldn't you prefer that a shortcut is available when the same thing is needed again? Xinotes is here to record your technical findings so that you won't have to go through the same process again when the problem reappears. Experience has taught us...
Created by Dr. Xi on November 23, 2009 23:37:55
Last update: November 24, 2009 04:04:20
IE can be started from JScript as an ActiveX control. Create a file named start_ie.js with the following contents and run (from command line or Run box):
var browser = new ActiveXObject("InternetExplorer....
Created by James on November 22, 2009 05:50:19
Last update: November 22, 2009 05:50:19
To add a DIV after the last element in body or before the first element:
// append to the end of body
var d1 = docum...
Created by James on November 19, 2009 04:55:01
Last update: November 19, 2009 04:55:01
JavaScript
<script type="text/javascript">
<!--
if ...
CSS
<img src="http://www.thedomain.com/images/cool...
Created by Dr. Xi on November 18, 2009 22:53:33
Last update: November 18, 2009 22:56:17
The "View Source" function in browsers displays the HTML source as it is received from the server. It does not show the HTML source after the DOM structure has been altered by JavaScript. Sometimes you want to see the HTML source as it is currently rendered in the browser. For Firefox: Without using any extension: select an area of the page, right click and select "View Selection Source" Using Firebug : click the HTML tab double click the body tag to edit copy all text in the edit panel and paste to your favorite editor. Using View Source Chart : right click and select "View Source Chart" For IE: Use View Rendered Source by Bill Friedrich: right click and select "View Rendered Source" For all...
Created by James on October 11, 2009 21:15:53
Last update: October 11, 2009 21:19:39
Many techniques for making rounded corners do not work well when the element being rounded is displayed on a background with a different color (or multiple colors).
Example 1: Nifty Cube with JavaScript
<html>
<head>
<base href="http://www.html.i...
Example 2: modx Simple Rounded Corner Box
<html>
<head>
<title>Round Corner</title>
...
Example 3: CSS3 (does not work in IE)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ...
Example 4: This is one that actually works ! The nifty corner technique can be tweaked to be background friendly, although the JavaScript version didn't work for some reason.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ...
Created by James on August 10, 2009 04:02:25
Last update: August 10, 2009 04:16:31
Function Description Examples
length This is actually a property. 'abcd'.length == 4
charAt(int) Return character at given index 'abcd'.charAt(2) == 'c'
(index starts from 0)
indexOf(string) Return first index of given string 'abcdcdcd'.indexOf('cd') == 2
lastIndexOf(string) Return last index of given string 'abcdcdcd'.lastIndexOf('cd') == 6
substring(beginIndex, endIndex) Return substring starting from beginIndex and ending at endIndex 'abcdcdcd'.substring(1, 3) == 'bc'
'abcdcdcd'.substring(1, 300) == 'bcdcdcd'
split(string) Split string into array of strings using given string as delimiter '/home/jsmith/download/js/'.split('/')
==
['', 'home', 'jsmith', 'download', 'js', '']
toLowerCase() Convert string to lower case 'AbCd'.toLowerCase() == 'abcd'
toUpperCase() Convert string to upper case 'AbCd'.toUpperCase() == 'ABCD'