Recent Notes

Displaying keyword search results 1 - 5
Created by Dr. Xi on August 31, 2008 20:43:44    Last update: January 22, 2011 12:48:08
It's probably more useful to make the JavaScript executor a bookmarklet. That way it gains access to the page on which it is invoked. Therefore, more helpful while debugging. Here's the code: <html> <body> <a href="javascript:(funct... Or, you can add this link to your bookmarks, name it "JS Executor". For a full featured JavaScript console, you may need Jash
Created by James on May 24, 2009 20:14:25    Last update: January 11, 2011 20:07:38
In the following HTML code, I attached an inline handler to the text field input and added two event handlers with addEventListener / attachEvent . Both IE and Firefox called the inline handler first. But the order in which the added event handlers were called are different between IE and Firefox (IE calls attached_click2 first). Further, if I add the same event handler multiple times, IE calls the handler the same number of times. But Firefox only calls the same handler once, no matter how many times it was added. <html> <body> <form> Input: <input type="... You can attach an event handler to an HTML element either inline , with JavaScript , or by calling addEventListener (DOM level 2), or attachEvent (IE specific). When you...
Created by Dr. Xi on July 29, 2009 20:58:51    Last update: July 29, 2009 20:58:51
You need to set several system variables in order to run a SQL script to update a column with JavaScript code: SQLT: set sqlt off The default SQLT (SQL terminator) is semicolon, which is used in JavaScript as statement terminator. Blank lines: set sqlblanklines on Blank lines are abundant in JavaScript. Don't let them terminate your SQL statement No variable substitution: set define off The ampersand is a JavaScript operator, which is also used by SQL*Plus for variable substitution. You should turn variable substitution off to preserve the JavaScript code. Finally, use slash (/) on a blank line to terminate your SQL code. Example: UPDATE events set JSCODE = 'var a = 1; var ...
Created by James on July 05, 2009 02:21:15    Last update: July 05, 2009 02:25:20
This is a JavaScript wrapper for Bare Naked App's progress bar. As usual, download their images and add this to the CSS: img.progressBar { background: white url(images... Then, add my JavaScript function, which takes a parent HTML element as input and returns the progress bar object with a setValue method: function createProgressBar(elem) { var img = d... Test code: <html> <head> <!-- setup code START --> ...
Created by Dr. Xi on April 22, 2007 21:58:45    Last update: January 19, 2009 20:26:12
Your code will be syntax highlighted when you specify the language of your code with the BBcode code tag: [code=lang] Your code here [/code] where "lang" is the language of your code. For example, the following Perl code #!/usr/bin/perl print "Hello World!\n"; is rendered with: [code=perl] #!/usr/bin/perl print "Hel... The following are supported languages and their corresponding names for BBcode: Apache conf: apacheconf, aconf, apache Bash... The full list is available from http://pygments.org/ , which is our backend engine for syntax highlight rendering.