-
The ability to split up a string into separate chunks has been supported in many programming languages and it is available in Javascript as well. If you had a long string like "Bobby Susan Tracy Jack Phil Yannis" and wanted to store each name separately, you could specify the space character...
-
I was doing an online job application this week when I encounter this problem. I can create Modal pop-up window using BLOCKED SCRIPT myLinkButton.Attributes.Add("onclick", "BLOCKED SCRIPTwindow.showModalDialog('http://" + myUrl + "')"); Everything works fine, because...
-
I've been asked to take a look at the dojo javascript framework today. At first, I thought it was a Java framework for handling AJAX stuff on the client-side. To my surprise, it was only for Javascript alone. It's amazing how it could make your job easier as a developer. You almost always have...
-
I'd like to share something I've made recently(though this may be so 1999). This post could either make your life easier or worse, it all depends on you whether you want to use it or not. I don't know if this kind of functionality already exists on any web framework(JMaki, .Net) but in case...
-
Yesterday I wrote a post as about adding a mailto link to a GridViewColumn and was surprised with the amount of response i got via email regarding that topic. One person asked me a frequently asked question which i realized I haven't tackled on my blog yet. The question was: Keith, Is it possible...
-
I've been looking this morning for a WYSIWYG editor to integrate with one of the personal projects I'm planning to make. It's going to be a WIKI that would allow anyone in my team to add, edit, view or search entries for best known knowledge. I'm planning on proposing the app to them...
-
In the system that I am currently maintaining, everything is a mess. You just won't know how to find something or where to find something unless you go down deep into their code. Hell! So while debugging a javascript portion and after hours of searching I still couldn't find the method in an...
-
I'm not sure if all DOM objects in HTML has the offsetLeft, offsetTop or offsetParent properties. Let me show you something that took me 2 days to figure out. Actually, I didn't figure it out because it was Eric Pascarello of javaranch who helped me. Let's get started Assumming you have the...
-
I've been coding Javascript when i was in college and whenever i try to play with Web Apps since my primary role hear at our company is related with Windows Apps. I've been browsing for something new this afternoon when i stumble upon this http://msdn.microsoft.com/msdnmag/issues/07/05/javascript...
-
There is a slight modification for my previous post . The conditions for the if statement there is inadequate. The bug occurs when refreshing the browser when the mouse is beyond the leftmost side of the window, a valid yet unanticipated negative value for the X. This is evident especially for dual monitors...
-
This is in response to my previous post re JavaScript Hashtable Implementation . I modified my code to be able to remove elements, as well as get an enumeration of the elements in cases wherein the keys are strings rather than integers. Here are the new members of the Hashtable object: Methods: remove...
-
I needed to do some routines when a user has closed the window. I do not want those routines to trigger when refreshing the page or unloading the document; I just need them to happen when the browser window is closed. This is the usual proposed solution: assign a function on the onbeforeunload event...
-
In Internet Explorer, when you use window.close() in JavaScript to close the current browser window, you will be asked something like "A script is attempting to close this window. Do you want to continue?" As a programmer, this can be annoying if you are un -maliciously closing the window....
-
Apparently, you need to set the SelectionLanguage property of a JavaScript XML Document object to XPath so you can select nodes via XPath. var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); // or var xmldoc = new ActiveXObject('Msxml2.DOMDocument.3.0'); xmldoc.async = "false";...
-
I needed a hashtable implementation in JavaScript and here's what I’ve come up. It is used like this: var ht = new Hashtable(); ht.put( “key” , “value” ); var val = ht.get( “key” ); // returns null if not found The implementation is like this: function Hashtable(){ this .hash = new Array(); this...