We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Hi, I need some advice or help. Basically I have a page that uses webloginpe and FDM and I’m using both to create a profile page for users. I would like to be able to update the uses profile without having to refresh the screen as doing so causes some info stored in a TV to disappear. I have no idea why it happens but I was thinking that perhaps using Ajax to submit changes to the profile might get around this issue.

    How can I send info from a Webloginpe template to the database using ajax instead of the current full screen refresh way? Is it exceptionally difficult to send info via ajax for something like this? Any suggestions would be great.
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 12556
      • 103 Posts
      I don’t have any experience with these particular templates you’re talking about but in general, no, it’s not difficult to send data to a database via AJAX. It’s fairly straight-forward to write your own JS to do this but jQuery makes it trivial. I’m pretty sure jQuery can be used with MODx (I plan on trying but haven’t made it to that point yet). You’ll probably just have to set the no conflict option. Check it out: http://jquery.com/

      The hardest part will be figuring out exactly where and how to connect to MODx’s database but I know it can be done.
      Dave
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        If only it was as simple as that... from what I have read and been advised, it could be a rewrite of WLPE to get this to work. Even Scotty hasn’t managed to get ajax working... Thanks for the info though.
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart