Adding a JavaScript library not working. Options
umbracoNewb
Posted: Wednesday, August 13, 2008 5:43:20 PM
Rank: Enthusiast

Joined: 8/5/2008
Posts: 25
Hi everyone.

I was not sure where to post this or if it is some type of bug.

I have seen the prototypejs javascript library and really like how it works. I was wondering if it is possible to use this in umbraco. When trying to add the javascript library i get a Failure[object Object]. So i am wondering if it is possible to use the prototypejs library in umbraco.

Thanks

UmbracoNewb
drobar
Posted: Wednesday, August 13, 2008 5:52:09 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,758
Location: KY, USA
Yes, you can use prototype, mootools, jquery... anything! I do this all the time.

The Failure message is probably caused by lack of file permissions in the /scripts folder. Double-check that the folder and any files therein have the proper permissions according to the installation instructions.

What you want to do is create a new .js file *through the umbraco ui* and paste the contents of your file into the umbraco editor, then save.

In umbraco 4, you'll be able to work directly with the files on the filesystem or through the umbraco ui. For v3, you want to work within the ui.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
umbracoNewb
Posted: Wednesday, August 13, 2008 6:34:03 PM
Rank: Enthusiast

Joined: 8/5/2008
Posts: 25
Doug,

Thank you very much for the quick reply. I went back and checked the settings for the /scripts folder and everything is set correctly there. I saw other version of prototype on the prototypejs site and found that anything newer than the 1.5.0 (January 18, 2007) version will give me the Failure[object Object] error. I am using umbraco version 3.0.3 and IE 7. I also created the .js file with the umbraco UI. If you have any other thoughts as to what is happening please let me know.

thanks again for the help and quick reply.

umbracoNewb
mortenbock
Posted: Wednesday, August 13, 2008 8:01:15 PM

Rank: Addict

Joined: 7/19/2006
Posts: 793
Location: Århus, Denmark
Do you get the error when saving the .js file from within Umbraco?

Have you tried just copying the .js file directly into the /scripts folder by ftp or such?

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

umbracoNewb
Posted: Wednesday, August 13, 2008 8:22:50 PM
Rank: Enthusiast

Joined: 8/5/2008
Posts: 25
Thank you mortenbock.

Not using the umbraco UI and just placing the .js file directly into the /scripts folder worked. I thought that might cause issues but it is working so far.

Thank you

umbracoNewb
drobar
Posted: Wednesday, August 13, 2008 8:30:15 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,758
Location: KY, USA
Placing the file directly will work, but you may have issues if you later try to open/save it via the umbraco ui. For the prototype.js file, though, you probably won't ever need to do that.

Glad it's working for you.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.