Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Silverstripe + Custom Code restrictions


Go to End


3 Posts   2169 Views

Avatar
acefx

Community Member, 8 Posts

31 January 2009 at 3:43am

Hi
am am very new to Silverstripe and i have already been working on a special project.
Well all is going well until i was working on building a custom application using php but silverstripe keeps giving me errors and also i do things like document.getElementById() in Javascript and it does not work.

can anyone help me out, even if its a function to show me how to go about it.

NOTE: am still an amateur in PHP so i dont write classes yet.

Thanks

Avatar
dio5

Community Member, 501 Posts

1 February 2009 at 5:53am

Edited: 01/02/2009 6:01am

I think you'll get more answers if you're a bit more specific about your problem.

Doing document.getElementById() is javascript, I suppose it's for the frontend site?

This should work like any normal site, independent of Silverstripe.

Adding javascript is easy: just put your js file under mysite/javascript and reference it from within the head of your Page.ss in themes/yourtheme/templates/.

(You could also use a requirements statement in your controller (http://doc.silverstripe.com/doku.php?id=requirements) but I don't tend to do that.)

Avatar
acefx

Community Member, 8 Posts

5 February 2009 at 8:53pm

Thanks man

I really appriciate this

It worked.