• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I can't see the error in this page

 
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write a simple loan payment calculator. Its a simple page right now, I'm just trying to get it working. Firebug doesn't give me any errors yet this doesn't seem to know what $(document).ready() is....

The html page and the js are in the same folder. The $ is defined in its scope...I don't know what is wrong...


[ February 12, 2008: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had to look pretty closely myself before spotting it. But check the syntax of your script tags.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P.S. Most of the cool jQuery kids use the shorthand for the document ready handler:
 
Bryce Martin
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
haha...geeeez....language? what was I thinking

I was using the shorthand version, but when I couldn't figure it out I got scared and went explicit just to be sure I'll be changing it back to the cool and hip way of writing it

Thanks Bear.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is amazing when browsers do what they actually are supposed to do. That mistake causes a lot of issues. It is rather common!

Another one with script tags is using empty tag notation



IE does not like that, but it works fine in other browsers.

Eric
 
Bryce Martin
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

IE does not like that, but it works fine in other browsers.



If only I had a nickel...
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bryce Martin:


If only I had a nickel...



It works the other way around too...

There are a lot of bugs with Firefox that I run into. I write a lot of JavaScript with my job and Firefox has a lot of bugs that cause JavaScript errors. Add Safari and Opera into the mix and you got a great cocktail for making anyone go insane! lol

Eric
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
... a great cocktail for making anyone go insane!


They're coming to take us away, ha ha, they're coming to take us away, ho ho, hee hee, ha ha ...
 
Bryce Martin
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I think I'm just starting to hit the tip of this Iceberg. Is there any good reason why they all don't standardize and fight it out on the stability/security/speed arena? I would think it pretty tough to make that trifecta work to its full potential without standardizing...

I'm just a dumb HLL programmer...what do I know
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there any good reason why they all don't standardize

You could try getting all parties into the same room and explaining it to them. Good luck with that. Just watch out for Ballmer and those flying chairs!
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

OIs there any good reason why they all don't standardize



Well, they didn't even standardize the basics (HTML, CSS, etc). There is a test called acid2 browser test developed by the web standards project, which test browsers' compliance with the standards of HTML4, CSS1, PNG and Data URLs. I didn't see a browser that passes this test completely yet (even though Microsoft changed the core rendering engine of IE8 to pass the acid2 test).

Standardizing javascript (and how different browsers handle it) is going to be more tough, and I believe that this will never happen in the near future. For God's sake, Microsoft has it's own dialect of javascript (jscript). I do not believe that browsers are going to handle javascript in the same way any where in the near future.

Why don't the key players sit together and try to get a solution to ease the lives of the web developers? Well, I think this has to do with politics, and has to do with the ways they do marketing. If you go to your favorite website, and find out that you can't view it unless you use IE, you might ditch firefox, and vice versa.

What shall we, the developers, do? Just keep on using the libraries that will hide the incompatibilities.
[ February 14, 2008: Message edited by: Alaa Nassef ]
 
Bryce Martin
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to Microsoft they have an internal build (pre-Alpha mind you) that they "claim" passes the acid test. Firefox has actually gotten their Alpha(fairly soon to be Beta) version of FF3 to pass it as well. So lets hope they try to win the hearts of the standards conscious web developers.

I think that FF will always be closer to full compliance than M$oft because they listen more to the standards conscious community. Besides, some of the guys that are working on it do web development as well. So they are looking out for themselves at the same time.

P.S. I'll show Ballmer where he can stick that chair...
 
Alaa Nassef
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bryce Martin:
I think that FF will always be closer to full compliance than M$oft because they listen more to the standards conscious community.



I agree with that completely, but I think that M$ will do its best to be compliant with web standards too. After all, with FF gaining more popularity over IE, Windows is losing another reason for remaining the standard OS, which is something Microsoft would never accept.

Actually, FF is not the only problem M$ is having. The new version of real player rocks, which will eat a great deal of the market share of Windows Media player. Not to speak about thunderbird opposed to outlook express/window mail.

M$ is going to face a great piece of trouble in the near future, especially with their new & improved OS called Vista .
 
reply
    Bookmark Topic Watch Topic
  • New Topic