What is “cetrk.com”?
If you are looking through the code on your site and find a mysterious call to a javascript in the domain “cetrk.com,” you may wonder what it is and if it is a malicious script
Continue readingSolving technology problems, one at a time
If you are looking through the code on your site and find a mysterious call to a javascript in the domain “cetrk.com,” you may wonder what it is and if it is a malicious script
Continue readingOnce you’ve created a shared online space for your coworkers, you may discover with some frustration that it doesn’t receive the level of interest you are hoping for. One reason for this reluctance to contribute may be lack of structure. Wikis don’t make a lot of assumptions about how you want to structure or navigate through your data, and this lack of structure can be confusing and somewhat intimidating to users, particularly if they aren’t sure where to put their information. This confusion is not limited to non-technical people: I’ve seen IT community sites and wikis lose members largely because of poor planning and navigational cues.
Although theoretically, the ability to add labels or tags to wiki pages eliminates the need to put them in any particular location within the site structure, people still like to know “where they are” within a site because the relationships between documents carries a lot of information about the significance of the document itself. Users need clues as to what else might be there and what to expect when they click to other pages.
Continue readingI had a lot of trouble trying to update the Views module. When I would attempt to run update.php, I got the White Screen of Death. I removed several modules and tried to view the
Continue readingIf you’ve used javascript much, you are probably familiar with arrays. Typically arrays are used to manage lists of items. I frequently use arrays for maintaining information about the state of pages and quiz questions in learning modules, storing a series of properties for each item.
But, there is a problem. To find the particular item you want to use, you must loop through the whole array. Sometimes you can get yourself into a situation requiring multiple loops to get one item of information and performance will suffer.
I recently got to wondering if there weren’t a way to jump straight to the desired item, if the ID of the item were known. Yes there is!
Enter “associative arrays“. Associative arrays allow you to index items by any string key, not just the usual arbitrary index numbers. So you can go straight to the exact item by name without testing for property matches while looping through the array.
Continue readingIf you are having problems with applications which use liveconnect, you may find it helpful to know that there are some issues with certain updates of Java 1.6 and Liveconnect. I’ve found that sometimes installing
Continue readingI recently had the (undesired) opportunity to learn about HTTP and SQL injection attacks. It took a great deal of effort to diagnose and clean up, but hopefully what I learned from the experience may help you prevent these attacks on your own site or clean up after such an attack.
I first found out my site had been compromised because one of the subdomains started displaying “403” errors (permission denied) and one of the users notified me that the site could no longer be reached. At this time, the rest of the site seemed fine, so I had not noticed anything was wrong with it myself.
On examining the subdomain files, it turned out that the .htaccess file had some new directives written into it, which had the effect of blocking all access to the site. When I further examined the file, it appeared that the actual intent had been to redirect only the users that arrived at the site through a search engine, while allowing direct visitors to see the site as usual.
Continue readingSometimes, when you use javascript to make a change to some element on a page, you will get a Javascript error along the lines of: “element ‘n’ has no properties.” You check your page, and yes, the element is definitely there, and it is definitely named correctly, and your syntax is definitely correct. So where is the problem?
Well, it may be a timing issue. If your script executes before the element targeted by the script has been rendered, it will not find the element. This can particularly be a problem with frames or iframes. The solution is to move the function call to the bottom of the page, after the element has loaded.
Continue readingWhen I first added AdSense ads to this blog, I had no idea what to expect. After three years, I would have to say that the results have been mixed, but overall I’ve found that
Continue readingSuppose you want to use the value of one variable as part of the name of another variable, but you don’t know the exact name of the first variable, because it will be selected by user input.
Continue readingWhen building web applications I often use display styles to show or hide divs or table rows as needed. On one project, I found that the “colspan” property did not seem to work in Firefox or Safari. This was because I had incorrectly used display:block to style the TR element, instead of display:table-row. A demo is below, and the code follows.
Continue reading