Asynchronous request with JavaScript: home-made AJAX

Web programming
This is a translation from my original post in spanish. I hope you enjoy it! Note: Original post had code in HTML, sorry if I missed something. A few days ago I was building a module that should make asynchronous requests to a webservice using javascript, in other words, the famous AJAX but manually made, without using any library. For those who do not know what AJAX is, it's what allows server requests without having to load the entire page. Surely you've seen it in many places, for example, when posting a comment on a blog which is posted and shown without a full reload of the page. So, in order to do this we need to use the XMLHttpRequest object of our browser using JavaScript and send a request…
Read More

Testing LINQ performance with ASP.Net

Web programming
This post its a translation from my original post in spanish. I hope you enjoy it! :) After learning the basics about LINQ and how it works, I had no choice but to test if, not only does it simplifies the code but also improves its efficiency. I decided to test the reading speed of XML files with LINQ and determine which one has a better reading speed: .Net XML access library or its new technology, LINQ. To that purpose, I built an XML with 100.000 registers which simulates a table with students data and I will send some requests. (more…)
Read More

How to throw a pop-up properly with Javascript

Web programming, Web standards
This is a translation from my original post in spanish. Hope you enjoy it! In some cases it can be useful for us and even more comfortable for the user to open a page in a pop-up on which to show the information. If we search in Google how to do it or read any javascript manual the code that will be shown its this one: [sourcecode language="js" wraplines="false"] window.open('url to open','window name','attribute1,attribute2') [/sourcecode] In fact, that code has some mistakes, lets see: Browsers without Javascript will cannot open the page. It will not be crawled correctly by searchers, and some crawlers, will not know how to follow it. When going over it with the mouse we will not see the url on our browser status bar. The user loses…
Read More

How to make a wordpress widget

Web programming
This is a translation from my original post in spanish. I hope you enjoy it! :) Continuing with the make your own wordpress theme guide, it is possible that you come to the point where you need a new module you don't have in the sidebar, more known as widget. There are a few ways for doing this, in one side since you can choose between a dynamic and an static sidebar you could choose the second one and just develop it in php in one piece, though it will not be editable from the administration panel. Another option is to enter in the admin panel and create a text widget which you can use to insert javascript or HTML code. But the problem comes in case you want to…
Read More