As you may have read from an earlier post I have been searching for a nice solution to figuring out which element currently has focus. Reason being is that it would be nice to detect if any element within Impromptu has focus, if not focus Impromptu. This way it keeps users from accessing the underlying page. The attempt I made was pretty simple: Apply focus event to ad a class name to the element, and to remove it on blur. Then I just need to search for that class name within the group of elements. My solution was a jquery plugin which looks like:
Ok, maybe that isn’t the most efficient solution, but its completely experimental. Anyway, to activate this puppy you would simply call this line to assign the events:
$('#my_el').focusfinder();
What I found was that different browsers fire focus and blur events differently, thus making my solution somewhat inaccurate. Firefox worked as expected, the others were a disappointment. Any ideas?
Thanks to Harry over at Code Bus we now have a PHP version of JsonSQL. For those not familiar with JsonSQL, it allows you to use basic SQL syntax to parse json. Supported syntax includes selects, order by, where, and limit and allows you to apply conditions on objects of any depth within the json or array and return an array of the objects selected. Where clauses are not sql conditions, but conditions from Javascript(or PHP in this conversion), so you have full access to that language’s functions.
Lately I’ve run into a brick wall. While working on the new version of Impromptu, I’ve had many requests to restrict the tab out of the prompt. Problem is how do you determine which element has focus without some ugly hacks like adding a class name to the element on its focus event, then removing it on blur.
The ideal solution would have jquery selector for :focus which would return the focused element, so then I would do something like so:
The problem is this selector isn’t implemented, or is it(are there any plugins out there)? Is it possible to retrieve such? Well of course everything is possible, but may not be pretty! So, does anyone have any suggestions?
I wasn’t aware myself there were issues with using sudo when using graphical applications, however a commenter refered me to an artical on Running Sudo Graphically. After reading over the article it’s points seem to be pretty clear, that when you use a command like:
sudo gedit /etc/apt/sources.list
issues can occur by running the application as root but with the user’s configuration file. It explains that you should use gksudo (gnome) or kdesu (kde) in place of sudo if you need to use X applications. Also an easy command line editor to use is nano in place of gedit when you need to edit files with sudo.
sudo nano /etc/apt/sources.list
Anyway, I recommend reading the article as it does a more thorough job explaining it than I do
With the new arrival of Open Blue Dragon, we may now have some new server environment combinations. Over at Shad Belcher’s blog he has now declared(christened as far as I’m aware) MAPO (Mac, Apache, Postgres, Open Blue Dragon). As big of a ColdFusion fan as I am I can’t wait to see the success of OBD. So what will it be called on Ubuntu.. UAPO? I guess in that case it would go back to linux, LAPO.
I realize this video is over a month old, but hey, it covers some good material with jQuery. Not to mention the kid presenting is 12 years old. Definitely worth watching!
A little off topic I know, but you never know if anyone is looking to relocate. My brother-in-law and I currently own two lots in Bucksville Oaks in beautiful Conway, SC. Bucksville Oaks is a brand new housing community located about 15 minutes from the vacation hot spot Myrtle Beach South Carolina. The community is planned to have 90 some houses when completed and already has the community pool in, pool house, street lights, trash pickup, and a walkway down to the river, yes thats right, the Waccamaw River.
Both lots are corner lots and are about .24 acres. The community is for single family homes at least 1600 sq. ft. with two car garages. If anyone is interested in purchasing one or both lots please leave a message below or Contact Me and I will email or call you back at the email address or number you provide. Price negotiable.