Jump to:

23472 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » error:Object cannot be created in this context" code: "9

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: 724 Views
  • ss_freebie
    Avatar
    Community Member
    6 Posts

    error:Object cannot be created in this context" code: "9 Link to this post

    Hi guys,

    I am very new to SS. Recently I want to create some elements like div on the front page from page.ss with plain js or prototype, I will encounter this error from LeftAndMain.js according to fire bug:

    Object cannot be created in this context" code: "9 LeftAndMain.js line 882
    (no name)()prototype.js (line 658)
    these()prototype.js (line 196)
    getTransport()prototype.js (line 659)
    initialize("Security/ping", undefined)prototype.js (line 738)
    create()prototype.js (line 25)
    (no name)()

    I know the LeftAndMain.js is system generated that I have not included it myself. However it is very annoying. So how can I get around this and be able to create elements myself such as dropdown menu, draggable div and etc ?
    Many thanks in advance.

    cheers,

  • billd
    Avatar
    Community Member
    1 Post

    Re: error:Object cannot be created in this context" code: "9 Link to this post

    hei, i have the same issue too, any one got idea ?!
    cheez

  • ss_freebie
    Avatar
    Community Member
    6 Posts

    Re: error:Object cannot be created in this context" code: "9 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 ?

    thanks

    724 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.