Sweet JavaScript Agony

JavaScript is a Bitch

More so, if you like spent most of your time avoiding it like some annoying friend. I mean, it is a lovable puppy, but sometimes it craps on your shoe and you want to kick it (Please don’t kick your pets). I know enough about programming in general to work my way around to solve some problems, it just takes hours of research and development and days of testing and debugging.

It is interesting as a hobby to learn how to get past the gotchas that are involved in developing in JavaScript. The parts that I don’t like are that you have to test for one thing for IE and another for Mozilla. I don’t code for Opera, which has less than one percent market share and even less than that are users to the sites I develop for. Nothing wrong with Opera, I just don’t care enough about it to want to support it. I have enough problems supporting IE and Mozilla.

xmlHTTPRequest

Oh yeah! One thing that I noticed is that you either have to close out of your connections if you want to use the same class to open multiple connections to pages, or extend it to different classes. It’ll throw an exception and spit out garbage otherwise.

It is fun, I mean. It is a lot easier than I thought it would be. The other stuff that comes with it, drag and drop elements and cool effects and transitions are the hard parts.

The only other issue is getting people to enable JavaScript. Most organizations and businesses disable it because they use IE and have issues. Unless their own intranet site uses it.

setInterval vs setTimeOut

I’ve had problems with using object oriented code in JavaScript and Timers. I’m going to try it again and see if I can get something working.

What I mean was that setTimeOut worked perfectly, until I tried to add another timer, then it just didn’t do anything. The project calls for four transitions. Fade In, Linear (left to right), Linear (bottom to top with probably a fade in also), and Fade Out.

I told the guy, “Is it okay if I just have it to where it just waits and then changes the content?” While it said it would be “Okay” it seemed that he didn’t want something that was already done in Flash. What I mean is that he didn’t want something that was Worse than what he had currently. Even if it would be dynamic over the currently static Flash movie.

New Tests

I think I have what the problem was with the old JavaScript code, so I’m going to try to test out a new implementation and see if it works. Wish me luck.

Possibly Related Posts:


1 Comments.

  1. I know exactly what you mean! I’m trying to produce a login system and it would work fine in FF, then not at all in IE. Then once I finally got the error out, IE wouldn’t POST over the information. I just don’t get it! Arrrgghh!!