Ryan Rampersad
Opinions, Thoughts and Ideas - PHP, Java and Javascript
  • Home
  • About
  • Contact
Browse: Home / Javascript

Javascript

Invalid Object Initialization

By Ryan on February 8, 2010

Firebug will scream and shout about Invalid Object Initialization if you mess just a little something up. Firebug does this a lot. It is an unhelpful error because Firebug will direct you to the first line of your object, not where the problem is.
Firebug gave me this, more or less. That wasn’t helpful. (Why did [...]

Posted in Javascript, Tips | Tagged Error, Javascript | Leave a response

Javascript let

By Ryan on November 24, 2009

Mozilla offers a let in javascript 1.7. The let keyword isn’t support by other browsers yet so using it isn’t generally recomended but it nice to catch up on the latest javascript constructs.
A Parallel
First, a parallel. I’ve coded in Java the last couple of months because of school. During said time, I discovered scoped blocks [...]

Posted in Javascript | Tagged block, Javascript, let, scope | 1 Response

Stop console.log errors without deleting each call

Stop console.log errors without deleting each call

By Ryan on October 28, 2009

Have you ever added a couple of console.log calls to your javascript, test it in Firefox, then go into Internet Explorer and see tons of mysterious errors popup? I sure have, I always forget about those console.logs that are interwoven in my code. While it isn’t hard to do a replace on them all, I [...]

Posted in Javascript, Tips | Tagged console.log, firebug, Javascript, Tips | 2 Responses

GoodCarousel - A Carousel with Mootools

GoodCarousel – A Carousel with Mootools

By Ryan on October 24, 2009

Hey there. I’m trying to get this plugin into the Mootools Forge but I’ve been having a hard time getting it to work. So in the mean time, checkout the repository on github.
GoodCarousel is a plugin made with Mootools 1.2.3. It is made to slide over to, not fade to, the next slide and uses [...]

Posted in Javascript, Mootools | Tagged goodcarousel, Javascript, Mootools, plugin | 12 Responses

Pluralize In Java, Javascript and PHP

By Ryan on September 17, 2009

I was just reading David Walsh’s post about Possessives. It was a very clever use of PHP. I remembered a helper method I wrote last year that was somewhat similar in use, another form of coding English. It was Pluralization.
At first I just added s if the first argument was not 1 and that won’t [...]

Posted in Java, Javascript, PHP | Tagged Java, Javascript, PHP, pluralize | 1 Response

Two Javascript Testing Utilities

Two Javascript Testing Utilities

By Ryan on September 10, 2009

PasteBin, Pastie and of course, Gist. There are tons of pasting services. Lately however, we’ve started to ask more of our neighborly paste service, we need it to run and demonstrate our javascript, basically, we need a javascript playground. I have found two such playgrounds, they both looks great and work well.
JSBin
JSBin is the more [...]

Posted in Javascript | Tagged Javascript, jsbin, mooshell | 2 Responses

How to use $javascript->codeBlock in CakePHP

By Ryan on August 22, 2009

CakePHP’s $javascript helper is useful but it can be somewhat fickle.
I wanted to throw my javascript into $scripts_for_layout so it’d be in the head of the page. That’s what codeBlock is supposed to do. It seems like you get a couple of usage options. You can write all your javascript as a string and pass it [...]

Posted in Javascript, PHP | Tagged CakePHP, Javascript, PHP | 4 Responses

Decrement Loop Speed

By Ryan on June 28, 2009

One thing I’ve heard a couple of times in either a trac ticket or in a forum thread is that we should all switch over to a decrement-style loop. Why? Simply because it’s faster. (We’ll ignore the time it takes to realize that you can actually loop down to zero.)
I’ve wondered if it really made [...]

Posted in Browsers, Java, Javascript | Tagged Browsers, decrement, increment, Java, Javascript, loop, speed | Leave a response

Easier Date-Time with Mootools

By Ryan on January 3, 2009

I’ve made a tix clock in javascript over my winter break. It hasn’t been released yet but it might be coming soon. In order to make it work for my local time since I don’t use 24-hour time like Europe does (I’m guessing, I don’t actually know), I had to use special logic to convert [...]

Posted in Javascript, Mootools | Tagged date, datejs, Javascript, Mootools, time | 3 Responses

Codepress: Javascript-based Code Editor

Codepress: Javascript-based Code Editor

By Ryan on November 29, 2008

Codepress would have been a great tool, especially now when browsers are getting faster. Codepress is no longer under active development and therefore the links below may or may not work.

I was looking around for a way to edit code in a pretty way with highlighting in javascript. I found Codepress. It’s a solution for [...]

Posted in Javascript, Reviews | Tagged code, cpdepress, edit, editor, Javascript, live, review | Leave a response

Next »

Recent Posts

  • Create a Branch and Switch to it in Git
  • Setting Build Path has Encountered a Problem in Eclipse
  • Queue Ajax Requests in Mootools
  • CakePHP 1.3 Helper $text truncate error
  • CakePHP – 1and1 – 500 Internal Server Error

Tags

(fluff)Grabber 2.7 2009 Apple array beta blog blogs Browser Browsers CakePHP chrome CSS Design Error Firefox fluff friends fluff grabber free Google html iGoogle internet explorer Java Javascript mac Microsoft Mootools music PHP plugin plurk program review School SEO solution string tip Tips update vista Windows windows 7 Wordpress

Search

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
QC: