Well like it or not we all need to test in other browsers. IE and Firefox aren’t the only browsers in the world. Webkit browsers are increasing in numbers and we need to pay attention to them as well. In the past I’ve used Konqueror to test but I’m not a big fan of it myself, so I did a quick Synaptic search and found a few other options. Midori is a nice little browser which uses webkit.

Midori Browser on Ubuntu

A couple other options which came up were webkit rendering for Epiphany, Arora web browser, and Kazehakase which allows Gecko and Webkit rendering engines. So there are a few nice options for testing without having to buy a Mac or install Chrome for Windows.

Also I hope everyone has a Merry Christmas!

A new version of jQuery Impromptu is out. One is a change which I noticed a bug with webkit, textareas, and the show() effect. Form inputs are improperly positioned when the show() effect is used as the entrance effect. The default show effect is now fadeIn, as I believe it provides an equally pleasing effect. Another change is a new option for “top” so you can change the position from the top of the screen which the prompt is displayed. Another change was an undocumented fix to the closing escape key was also put into place.

On a closing note a couple users reported that Impromptu and jqModal do not play nicely together, however one user did mention they found the problem to be on the jqModal end. I’m not familiar with that plugin so I am unable to add any further input at this time. Enjoy everyone!

It seems you can never do enough to protect your website. One pointer I thought I’d mention is to remember to not use the default ColdFusion sessions when possible as they do not encrypt session cookies on the client. You can easily change this in the administrator to use UUID for cftoken cookies under the settings page.

But you can do yourself a bigger favor and use J2EE Sessions just as easily by simply checking the box under the Session Management section. At this point you should now see a new cookie being set by ColdFusion called jsessionid, and it should be a nice encrypted string.

Finally, if you need to hide the other cookies (cfid and cftoken) for whatever purpose for compliances or whatnot(maybe you need PCI compliance) you will need to go into your application.cfc or application.cfm file and change:

  • this.clientManagement = false
  • this.setClientCookies = false

You should be able to continue using session as normal and you should only see one cookie generated by ColdFusion, jsessionid. Any other cookies you set yourself will still work properly as well.

This should be on your checklist of things to do for any websites with logins or sensitive data. Also it never hurts to check your non ColdFusion applications as well to make sure they are using encrypted cookie session id’s! Here is a link to a few very quick things you can do to help protect your site: http://www.owasp.org/index.php/Configuration

A few days ago I wrote about Link Nudging, and I got to thinking this could easily be a lot more customizable and flexible, so I added a couple lines more to it and now you can give most any css attribute a “Yoyo” effect. Maybe yoyo isn’t the best word to describe it but hey, this was a late night of programming.


jQuery.fn.yoyo = function(attr,o){
o = jQuery.extend({},{ range:20, speed:400, easing: 'linear' },o);
var r = { hover:{ attr: o.range }, out:{} };
r['hover'][attr] = ‘+=’+ o.range;
r['out'][attr] = ‘-=’+ o.range;
jQuery(this).hover(function() { //mouse in
jQuery(this).animate(r.hover, o.speed, o.easing);
}, function() { //mouse out
jQuery(this).animate(r.out, o.speed, o.easing);
});
}

That’s not so bad. Now to call this mighty beast say we want to change textIndent by a range of 20px:


$('.box1').yoyo('textIndent',{ range: 20 });

Or we might want to change letterSpacing by 3, which will give it a stretching effect:


$('.box2').yoyo('letterSpacing',{ range: 3 });

So now you want to see that it actually works,.. I have a demo just for you!

Sure its definitely a trivial thing todo, but I thought I’d post how to get up and running within a minute using Gnome Schedule in Ubuntu(I’m sure Gnome Schedule is available for most linux distros as well). First just open up Synaptic Package Manager and do a search for Gnome Schedule.

Check the box beside Gnome Schedule and click Apply at the top. Wham! You should now have it installed. To open the scheduler gui go to Application -> System Tools -> Scheduled Tasks.

We now have a dirt simple scheduling program. If you can’t figure out what to do from here you’re hopeless. Just click New and enter which type schedule you want to execute (reoccurring, one time, or you can use a template)

Happy Scheduling!

Browsing around the other day I came across a tool by David Walsh called Link Nudging. Basically it simply adds an effect on hover state to increase the left padding, or “Nudge”. Take a look at his link nudging demo to get a better understanding. The code is very compact (about 5 lines if you like to format your code) and easy to modify to fit your needs. However, I’m never content, so I added another line or two to make it more reusable, customizable, and more jQuery like:


jQuery.fn.nudge = function(o){
o = jQuery.extend({},{ indent:20, speed:400},o);
jQuery(this).hover(function() { //mouse in
jQuery(this).animate({ paddingLeft: ‘+=’+o.indent }, o.speed);
}, function() { //mouse out
jQuery(this).animate({ paddingLeft: ‘-=’+o.indent }, o.speed);
});
}

Now we’ve extended jQuery so we can apply a nudging effect to any group of elements like so:


$(’a.nudge’).nudge();

We’ve also made it possible to pass in the number of pixels to indent instead of hard coding the pixels into the animation as well as changing the speed. To change these options we can do the following:


$(’a.nudge’).nudge({ indent:40, speed:300 });

Hope someone finds this useful! Credit goes to David Walsh for creating this, I just added a few tweaks!

Many people are perhaps still a little unclear of what jQuery Impromptu really is. Its not just a lightbox or dialog. Its actually a small framework to process forms utilizing ajax; and along the way it happened to solve the ugly default confirm and alert problem.

It works by first allowing the user to supply html for display in the prompt. The user can supply as many fields as they like and style them to fit their needs. Then, with strategic callback functions you can validate and/or complete the prompt form. The common framework example is generally defined like the following:


$.prompt(txt,{
buttons:{Ok:true, Cancel:false},
submit: function(v,m){
//parameter v is the value clicked, m is the message at the time it was submitted
//validate our fields, return true if it validates, false if not
//returning false will hold the prompt open
//returning true will proceed to the callback function
},
callback: function(v,m){
//we passed validation process our form!
}
});

This small framework will allow you to process forms consistently, so no matter what type form you’re processing, you can they all follow the same process. Taking it one step further, lets say we need to retrieve all the values in our form so we can validate them. We would add a line like the following:


$.prompt(txt,{
buttons:{Ok:true, Cancel:false},
submit: function(v,m){
var vals = m.find(':input');
if(v){
//user clicked 'Ok', so validate
}
},
callback: function(v,m){
var vals = m.find(':input').serializeArray();
if(v){ //send with Ajax!
$.post('mypage.php',{ var0: vals[0].value },function(){});
}
}
});

There you have it, about as simple as it gets for ajax forms. Download it and give it a whirl, or look at a couple demos.

I was thumbing through Digg today when I come across an article showing “12 Excellent Free Text Editors“. I’ve tried a few of these, infact I do like a few of them for what they are, but after recently using Coda and Textmate I have to admit these two really set the standard for doing web based work. The simplicity of using each one, yet the necessity features. By necessity I am referring to syntax highlighting, file browser, code suggest, and maybe snipplets and searching through files are useful too.

That being said I have to say the editor under the Linux developer’s nose might not be far off pace. gEdit has a few plugins that make it very good. The file browser plugin is supurb and easy to switch themes for syntax highlighting is very nice. However its key feature missing is code completion/suggest. With the vast amount of javascript, php, CF functions its nearly impossible to remember each one, or the fact of not typing those_long_function_names.

Then there is Geany. Similar to gEdit, it has a file browser plugin, but more importantly has code suggest. But of course I have one small issue. The file browser only browses one directory at a time, no tree structure. I know that sounds picky, but when you’re looking at your directory structure or files in use it is very helpful to see what files are where

So my fantasies are that gEdit have code suggest(not from the current document, but from the language API reference) and/or Geany have a tree structured file browser. These plugins may already exist, but I haven’t found them. If anyone has any suggestions on other editors to give a try on linux I would love to hear about them!

After upgrading Ubuntu to 8.10 I was upset to find out that my virtual hosts in apache no longer seem to work. Everything went to the default host. After doing a little research I found that in ports.conf they have now specified the port in NameVirtualHost:


NameVirtualHost *:80

When it use to be:


NameVirtualHost *

I tried changing this NameVirtualHost back to the old way but that seemed to give me more errors. The solution to this is to find wherever you have your VirtualHost declared(could be in /etc/apache2/httpd.conf or in the site’s conf files in /etc/apache2/sites-enabled) and add :80 to it like the following:


<VirtualHost *:80>
ServerName test.localhost
DocumentRoot /home/username/www/test/
</VirtualHost>

Then you just need to restart Apache:


sudo /etc/init.d/apache2 restart

Hope this helps someone out, surely helped me!

I’m please to say that there is a new Impromptu theme available on the Impromptu Documentation site. The theme is demonstrated in Example 15. I have also upgraded the examples and demos to use the latest jQuery. No changes to Impromptu were necessary in the jQuery 1.2.6 upgrade!

Next Page »