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

A simple AJAX example


Go to End


4 Posts   2160 Views

Avatar
MrTea

Community Member, 2 Posts

27 January 2015 at 2:47am

Edited: 27/01/2015 2:53am

Hello there,

Would anyone be able to post a simple example of working with AJAX requests in silverstripe? Couldn't find much documentation on this.

Let's say we create a page type 'AjaxPage' and have the controller output a form with a text box to enter your name and a submit button. I'd like to see the form processed and return a value e.g 'hello mike' so that i can output it in the AjaxPage layout file.

I just need to see the process/steps invovled.

Thanks :)

Avatar
Devlin

Community Member, 344 Posts

27 January 2015 at 9:39pm

Couldn't find much documentation on this.

Yeah, because this is hardly a SilverStripe issue.

Have a look here:
http://stackoverflow.com/questions/1960240/jquery-ajax-submit-form

Avatar
MrTea

Community Member, 2 Posts

27 January 2015 at 10:25pm

For anyone interested I came across this link which is excellent

http://ajax-silverstripe.mmkdigital.com/#/1

Avatar
probablytony

Community Member, 4 Posts

7 February 2017 at 10:26pm

For anyone else interested, here is a snapshot of the above link which is dead: https://web.archive.org/web/20150805051807/http://ajax-silverstripe.mmkdigital.com/