Category Archives: web development

OpenLayers disable dragging

OpenLayers and dragging

If working with OpenLayers you may know how the map by default is with dragging enabled. Even when in the API is said that setCenter() method is taking a forth parameter the boolean dragging it’s actually not working.

setCenter: function(lonlat, zoom, dragging, forceZoomChange)

As described there: Continue reading OpenLayers disable dragging →

MaYoMo released

The project I’m working on finally released as Beta – www.mayomo.com

MaYoMo is a “social news network” for journalists and their readers that empowers a new era of Internet news creation and distribution. With an ever-expanding corps of citizen and independent journalists based in every corner of the globe, MaYoMo is shaping the evolution of journalism and delivering the world’s most inspired multimedia news content. Now, thanks to MaYoMo’s highly unique and entrepreneurial “news channel approach,” professional, amateur, and student journalists can create and manage their own custom news channel, unleashing new career and business opportunities based on the company’s shared revenue advertising model. MaYoMo lets you discover the power of news like never before and experience the new future of journalism and news content distribution.

__flash__removeCallback problem on IE6

Every time the page unloads

If there’s a flash movie into your page using the AMF protocol to speak with the other part of the site, there may be a bug under Internet Explorer version 6 … again. The AMF protocol stands for Action Message Format is simply JavaScript – Actionscript way to get connected. And it simply registers the callbacks from both sides. So there’s simply a object/embed pair in the HTML and a Flash movie using AMF, and IE6. Everything’s OK until leaving the page. On unload the window object the generated JavaScript code breaks and throws an error. Usually it’s something like that:

function __flash__removeCallback(instance, name) {
    ... here instance is given null under IE6
}

What if embed with some js library (SWFObject)

Reading some forum posts it may be working if I was using a js/flash library such as SWFObject, but I don’t want such, because of one another JavaScript file loading and blocking the content. I just wanted the object/embed to be in my page. Continue reading __flash__removeCallback problem on IE6 →

debug JavaScript on IE6

The built-in JavaScript debugger

While developing your next site, you’ve may noticed that under IE, specially version 6, it’s very hard to debug any kind of JavaScript code. Yes actually if you’ve configured the browser for that purpose you may get any message, which unfortunately is completely useless. In general the message is something like: “There’s an script error on some line of the code!”, but very often there’s no such line of code or it’s empty or something else. Actually that poor debugger is giving the error by the generated script code which really does not help.

Microsoft Script Debugger

The installation of Microsoft Script Debugger solves this problem. It gives the line and the code, even highlights the error.

sprite usage and website optimization

What’s a sprite?

When a website is developed common scenario is to put all of your images used in the UI in a .css file. Yes some did not use it, which I think is too much old school, but however maybe 99.9% did make it that way. In fact in nowadays sites we’ve more and more rounded corners, more alpha in our images. But what’s a sprite at all.

Well imagine you’ve 20 of these images requested in you .css file, if we suggest we’ve only one stylesheet file. Than when your page is rendered into a browser there must be 20 requests to the server for those images. And so many requests may really slow down your page load. Using only one image with correct

background-image
background-position

properties in you css make your site load really fast. Continue reading sprite usage and website optimization →