Jump to:

22999 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » How to include scriptaculous in SS

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1611 Views
  • ss_freebie
    Avatar
    Community Member
    6 Posts

    How to include scriptaculous in SS Link to this post

    Hi there,

    I am very new to SS. I want to include prototype and scriptaculous in the fornt end, what I have done is followings:

    Page.php:

    public function init() {
          parent::init();

          Requirements::themedCSS("layout");
          Requirements::themedCSS("typography");
          Requirements::themedCSS("form");
          Requirements::javascript("jsparty/prototype.js");
          Requirements::javascript("jsparty/prototype15.js");
    Requirements::javascript("jsparty/prototype_improvements.js");
    Requirements::javascript("jsparty/prototype-safe.js");
    Requirements::javascript("jsparty/scriptaculous/scriptaculous.js"); //this line seems not include scriptaculous.js
          
       
       }

    The prototype is included and working FINE but not the scriptaculous to me but I am not sure since once I used the effect.fade() or draggable, the
    Object cannot be created in this context" code: "9
    occurs, I have raised this problem in my previous post.

    So I would like to check with your guys, did I do the right thing to include prototype and scriptaculous ? Pls advise...
    Thanks heaps

  • marcusl
    Avatar
    Community Member
    1 Post

    Re: How to include scriptaculous in SS Link to this post

    Hei guys,

    I am a newbie to SS too, tried to use script.aculo.us but not sure how to include it in the front end as well. Any one can help here ?
    thanks:)

  • ss_freebie
    Avatar
    Community Member
    6 Posts

    Re: How to include scriptaculous in SS Link to this post

    i have included the following prototype library in page.php:

    Requirements::javascript("jsparty/prototype.js");
    Requirements::javascript("jsparty/prototype15.js");
    Requirements::javascript("jsparty/prototype_improvements.js");
    Requirements::javascript("jsparty/prototype-safe.js");

    i can use prototype library on the front end without problems, but as soon as i add this line for scriptaculous:

    Requirements::javascript("jsparty/scriptaculous/scriptaculous.js");

    on the front end i got the same javascript error from fire bug as mentioned above:
    Object cannot be created in this context" code: "9

    have i done something wrong ? any advices for utilising scriptacolous correctly ?

    thanks:)

    1611 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.