Category Archives: javascript

Javascript regexp usage

ShareI found this reference very helpful because I tend to forget the difference between match, test, search and so on. Description Example RegExp.exec(string) Applies the RegExp to the given string, and returns the match information. var match = /s(amp)le/i.exec(“Sample text”) … Continue reading

Posted in javascript | Tagged , , | Leave a comment

ie bug: form within a form not posting values

ShareYou might be wondering why you cannot post the values of some fields even it’s inside the form. Having a form within a form in your html code/dom is a BIG issue when it comes to ie. Some of the … Continue reading

Posted in dom, html, javascript | Tagged , , , | Leave a comment

javascript reference

ShareHere’s a good site for javascript reference: http://users.dickinson.edu/~braught/courses/cs131s99/jsRef.html

Posted in anything under the moonlight, javascript | Tagged | Leave a comment

prototype window

ShareI discovered this thing from a friend and it’s a cool stuff. Haven’t tried it though but really excited to give it a shot. Overview This javascript class allows you to add window in a HTML page. This class is … Continue reading

Posted in anything under the moonlight, javascript | Tagged , , | Comments Off

stopPropagation() and cancelBubble

ShareAnother way of doing the cancelBubble: function dropButtonClick(e) { if( typeof( e ) == “undefined” && typeof( window.event ) != “undefined” ) e = window.event; // do things…. if (typeof( window.event ) != “undefined” ) { // IE e.cancelBubble=true; } … Continue reading

Posted in javascript | Tagged , , | Leave a comment