Spam blocking with JavaScript and CSS

I got inspired by kari patila’s post where he uses CSS class to hide spam text using CSS and I wrote something my own by using JavaScript and content to write email address.

.email:after {
content: “@jpkeisala.com”;
}

<a class=”email” xhref=”http://www.jpkeisala.com/v6/#” mce_href=”http://www.jpkeisala.com/v6/#” onclick=”window.location = ‘mailto:’+this.innerHTML+’@jpkeisala.com'”>jp</a>

a bit ugly but i think it works.

When JavaScript is cool…

This is really cool especially for me old dhtml dude/today XSLT dude (and seems like AJAX dude tomorrow).

$(“ul#menu>li[ul] a.active”).toggle(function(){}

So, what is going on above? I am writing CSS selectors combined with XPath to target specific elements. Library that makes this all possible is called jQuery

XPath is a part of a part of it’s jQuery expression language together with CSS.
jQuery is really worth of checking out.

Yahoo Mail Worm

Now that the Rich Internet Applications are getting more and more popular, just like any other environment we are getting problems from the bad guys.  Now that the door is opened publicly there will be lots of crackers crawling through AJAX codes and finding holes to insert their own little exploits, this of course means that more security problems like the Yamanner worm are along the way.

What makes it a problem in AJAX world is that source-code is relatively easy to get and for writing an exploit you don’t have to be a clever guy, it’s pretty easy. Also for AJAX developers it’s very hard to filter out possible exploits and write safe JavaScript.

So how to solve security problems that JavaScript brings us?

Btw: Here is a source of XHR object that made all this possible.

Creating Bar Graphs with CSS

Polls or graphs are usually images generated from desktop software or web scripts perhaps sometimes flash+xml, and when it comes to web it is too much resource consuming to generate image on the fly.
Since we don’t have CANVAS or SVG yet on wide use there is a CSS trick.
The idea of using CSS to generate Bar Graphs could be very interesting in this case, and Apples to Oranges have a pretty interesting article describing in details how to create Bar Graphs with CSS.

JavaScript Terminal

JavaScript Terminal
JS/UIX is an UN*X-like OS for standard web-browsers, written entirely in JavaScript (no plug-ins used). It comprises a virtual machine, shell, virtual file-system, process-management, and brings its own terminal with screen- and keyboard-mapping.

Web Developer Toolbar for IE

The IE Developer Toolbar provides several features for deeply exploring and understanding Web pages.

  • Explore and modify the document object model (DOM) of a web page.
  • Locate and select specific elements on a web page through a variety of techniques.
  • Selectively disable Internet Explorer settings.
  • View HTML object class names, ID’s, and details such as link paths, tab index values, and access keys.
  • Outline tables, table cells, images, or selected tags.
  • Validate HTML, CSS, WAI, and RSS web feed links.
  • Display image dimensions, file sizes, path information, and alternate (ALT) text.
  • Immediately resize the browser window to 800×600 or a custom size.
  • Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
  • Choose direct links to W3C specification references, the Internet Explorer team weblog (blog), and other resources.
  • Display a fully featured design ruler to help accurately align objects on your pages.

Dowload here