Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Auto save without page refresh 15 Jul 2016 14:26 #14266

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
I have a form which has elements triggered by previously filled fields

I would like certain fields to trigger the SAVE functionality onChange, then refresh the form view that the user is CURRENTLY ON without reloading the page. I can alter the value of individual fields with an onChange request, but not attempted to fire the view.save function

Is this possible? Has anyone accomplished this or is the Joomla framework too rigid to allow it without hacking core component? I am guessing it will actually require a recode of the save function
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Auto save without page refresh 15 Jul 2016 14:45 #14267

Try playing with:
onclick="return Joomla.submitformAjax('demoitem.apply');"

BTW: this is the type of code utilized by the "save" of a modal form
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by vlemos.

Auto save without page refresh 15 Jul 2016 18:00 #14270

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
When you open a form in modal, if you click "Save and Close" then your form is fully sent in Ajax. And the response is checked to know if staying on the page, or closing the modal. This is already in Ajax in your component.

(BTW there is an issue with AJAX files uploads at the moment.)

If you click Save, or Save and New, then the page is called in normal request because in both case it will keep the modal open, so JS do not deed to call in ajax.

Look in the JDom assets (toolbar.js) There you will find the Ajax features.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Auto save without page refresh 15 Jul 2016 18:02 #14271

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986

vlemos wrote: Try playing with:

onclick="return Joomla.submitformAjax('demoitem.apply');"

BTW: this is the type of code utilized by the "save" of a modal form


Arff, I see your answer now.
Perfect answer, shorter and better than mine.

Vlemos, always brillant. You are our javascript guru.

K++
Coding is now a piece of cake
The following user(s) said Thank You: vlemos

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.061 seconds

  Merci d'avoir présenté ce service web générateur de composant joomla. L'interface est très conviviale on a le plaisir du drag&drop et c'est assez rare pour être signalé. Je souhaite que ce projet connaisse un fort succès votre réalisation est méritante.
Yann Gomiero (AFUJ - France)

Get Started