• 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

New article: Baby Steps With Scriptaculous

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The November issue of the JavaRanch Journal has an article by David O'Meara about Baby Steps With Scriptaculous. You can check it out here, and if you have comments or question, feel free to post them in this thread.
 
Sheriff
Posts: 67746
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
Splendid article!
 
Bear Bibeault
Sheriff
Posts: 67746
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 Frank Lawlor:
I tried the first example.

In IE it just fails with "Error: 'Effect' is undefined.

In Firefox something works, but the screen displayed is:



-- Frank

 
Bear Bibeault
Sheriff
Posts: 67746
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
Did you place the .js files in the correct location? All of them?

Even though prototype.js and scriptaculous.js are the only script files explicitly referenced in the HTML file, all of the Scriptaculous script files must be present as scriptaculous.js is just a dynamic loader for the other files.
[ November 08, 2007: Message edited by: Bear Bibeault ]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I copied all the .js files into a javascript subdirectory and I still get the same results. Since it seems to somewhat work under Firefox, I assume the directory structure is correct and it is finding the files.

Originally I only copied some of the files since the article explicitly said "we just need the ones listed."

I copied the files to another system and got the same results.
 
Bear Bibeault
Sheriff
Posts: 67746
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 Frank Lawlor:
I copied all the .js files into a javascript subdirectory and I still get the same results.


How are you referencing the js files from the HTML page? If I recall, the article assumes that they are in the same folder as the HTML file?

Since it seems to somewhat work under Firefox, I assume the directory structure is correct and it is finding the files.


Not necessarily the best of assumptions. Firefox is really bad about silently swallowing undefined reference errors.
[ November 09, 2007: Message edited by: Bear Bibeault ]
 
Frank Lawlor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I copied the code exactly as in the example (cut and paste).

Firfox might swallow errors, but, as I said, it basically works so it must be finding the js files (or it wouldn't work at all).

I notice that if I click on the example imbedded in the article, I get the same results (IE doesn't work at all) but it is better formatted as buttons.
 
Frank Lawlor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I move the test1.html file to anoter location is doesn't work at all, even under FireFox.

The example has the files in a javascript subdir.
 
Bear Bibeault
Sheriff
Posts: 67746
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 Frank Lawlor:
I notice that if I click on the example imbedded in the article, I get the same results (IE doesn't work at all) but it is better formatted as buttons.


The little "blind up" and "blind down" examples in the article don't work for you?

That means that the issue is not with your setup but rather with the browsers themselves. What could be wrong that would cause this to fail across browsers is beyond me. The in-article examples are working fine for me on Firefox and Safari. They work on Opera as well, but the animation is a bit stilted.

Do you have the opportunity to hit the article with another machine and try the in-article examples?
[ November 09, 2007: Message edited by: Bear Bibeault ]
 
Frank Lawlor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried the exmple in the article on another machine.
Same results as on my machine.
Works in Firefox, fails in IE.
 
Bear Bibeault
Sheriff
Posts: 67746
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
Hmmm, I have no way to test in IE until Tuesday. Will check into it then.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked into the problem and it is because the script tags have

type="application/x-javascript"

it needs to be

type="text/javascript"

Eric
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • 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:
it needs to be

type="text/javascript"



Fixed.
 
Frank Lawlor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, that did the trick. Now it functions on IE, too. Thanks.

The styling, however, looks nothing like the article and I don't see anything to make them look like buttons. The explicit 200px style is causing the first title to break to a second line on my machines.

It really is a good idea to have someone else try out your examples before you submit an article. So many mistakes in your first example can destroy your credibility and make people disinclined to read on.
 
reply
    Bookmark Topic Watch Topic
  • New Topic