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 July 19, 2009 20:51:23    Last update: January 11, 2011 20:14:18
If CSS3 border-image is properly supported, making a rounded corner box is very easy. You just need a round corner image like this: The following markup: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ... would render like this (try it in Firefox 3.5 and Google Chrome): However, IE as of version 8.0 does not support border-image . So until border-image is reliably supported in all major browsers, we still have to rely on tried and true tricks to make it work. In general, I found three general categories of tricks to make rounded corners: Good old tables. This trick creates a table of 9 cells and uses the 8 cells on the perimeter to render the borders and rounded corners. The central cell is used for...
Created by James on June 30, 2010 19:04:45    Last update: July 03, 2010 21:24:33
Technically, file upload cannot be handled by Ajax, because XMLHttpRequest (XHR) does not handle file inputs. All techniques not using Flash rely on an invisible iframe as the upload form submit target. JavaScript then grabs the response content from the iframe and present it, giving the same illusion as Ajax. webtoolkit AIM The technique by webtoolkit is very simple. It involves 3 simple steps: include the AIM script, implement the start/finish JavaScript functions, and add an onsubmit handler to the normal file upload form. The hooked up form looks like: <head> <script type="text/javascript" src="webt... The AIM script is also quite simple: /** * * AJAX IFRAME METHOD (AIM) * http... The above code only supports HTML responses. In order to support JSON responses, the above...
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 October 04, 2008 04:13:57    Last update: October 04, 2008 04:15:22
substr returns a substring beginning at a specified location and having a specified length . substring returns a substring by specifying the start and end index. s = 'She-sells-sea-shells-by-the-sea-shore'; s.... But really, providing two options does not make things better. Either one gets the jobs done. Two options just create more confusion.