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

[Solved] How to AJAX...


Go to End


2 Posts   712 Views

Avatar
Vlad Belfort

Community Member, 55 Posts

29 July 2016 at 2:01am

I have a form that's applied on every page throughout the site and need it to be sent asynchronously without taking the user anywhere.

I can't figure out out to catch the sent data... I'm using Page.php for it because I assume since it's on every page it belongs there; I ran through the ajax tutorial but that doesn't cover the topic, only the example site that's being worked on. I read it, I watched the video and still can't get it working.

What I need to know is what URL to send data to (I assume its any since Page applies to all pages, right?) and how to catch the request. The rest I'll probably figure out once I overcome this problem