Module and Ajax

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Locked
chrishvmp
New Member
New Member
Posts: 4
Joined: Fri Nov 05, 2010 3:25 pm

Module and Ajax

Post by chrishvmp »

Hi Guys,

New player here, just started using CMSMS this week. I'm trying to develop a new module, wich will use Ajax in the frontend (end-user) website. I've searched for a couple of hours for the past few days, but the documentation isn't really great, and the module tutorial doesn't explain a thing about Ajax.

Is there any developer out there who implemented Ajax in his (or her..) module? I just want to know.. If i make a ajax request, to what file do i need to point it to? There's just no answer in google :-(

Thanks in advance!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Module and Ajax

Post by calguy1000 »

Ajax is quite simple in CMSMS.

a:  Use the CreateLink method to create a URL to the page that you want...
    (if you specify inline=false the page really won't matter, and no tag will be required on the page)
    I usually just pass in $returnid for that anyway.s
   
b:  Add showtemplate=false to the URL
c:  You may have to erase the amp; stuff out of teh url.
d:  use your normal jquery post stuff.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Developers Discussion”