Welcome, Guest
Username: Password: Remember me

TOPIC: ajax-complete event on jdomAjax

ajax-complete event on jdomAjax 05 Jul 2016 03:53 #14133

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hello Admin

I reused this code for reloading and auto-selecting the entries of a comboBox; however, the hidden input field is not updated.

Is there a way to add/set the input value after an ajax-complete event?

Thanks and regards
vlemos

jQuery("#_ajax_items_select2").jdomAjax({
	"namespace":"demo.items.ajax.select2”,
	"vars":{"class_id": this.value ,
		"values":[ itemid ]
	}
});

<input id="jform_item_id" class="validate[required]" type="hidden" value="" name="jform[item_id]">
The administrator has disabled public write access.

ajax-complete event on jdomAjax 05 Jul 2016 16:53 #14146

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hello Admin

Would love to be able to have direct access to the ajax-complete event out of the box.
jQuery("#_ajax_items_select2").jdomAjax({
	"namespace":"demo.items.ajax.select2”,
	"vars":{"class_id": this.value ,
		"values":[ itemid ]
	}
}).jdomAjaxComplete(function() {
	var index = $("#__ajx_item_id").val();
	$('#jform_item_id').val(index);
});

For now, filtering "completes" is an option.
$( document ).ajaxComplete(function( event, xhr, settings ) {
	var render = getRendering('render', settings.data);
	if ( render === "custom" ) {
		var index = $("#__ajx_item_id").val();
		$('#jform_item_id').val(index);
	}
});

Any other ideas are welcomed

Warm regards
The administrator has disabled public write access.

ajax-complete event on jdomAjax 06 Jul 2016 17:23 #14168

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
For ajax stuff, this is under rewrite. So now my head is full with the new code.

What is the "getRendering" function ?

did you tried :
jQuery("#_ajax_items_select2").ajaxComplete(...)

Because you are asking the event over the document object, but I never put my code on the document. It might be attached to the field.
The new Ajax framework is called 'Hook' and some parts are already available in JDom, but still under coding.

In future there will no be any code in the view. only XML, such as a normal field.
And the Hook framework permits overrides of plugins. Same as JDom.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: vlemos

ajax-complete event on jdomAjax 06 Jul 2016 18:57 #14169

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Ok thanks for the reply Admin:

"getRendering" is a small routine which extracts the render value from the url. This way the code only responds when the combo is updated.

Warm regards
vlemos
The administrator has disabled public write access.

ajax-complete event on jdomAjax 06 Jul 2016 20:42 #14171

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Tried:
jQuery("#_ajax_items_select2").ajaxComplete(...)
But it doesn't work. Can you fix it in the builder? Would be a much better solution overall.

Thanks
vlemos
The administrator has disabled public write access.

ajax-complete event on jdomAjax 06 Jan 2017 14:52 #14918

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hello Admin

Is there anything being done to give access to the Ajax complete event we spoke about a few months ago? I need to know when some Ajax calls are completed.

Warm regards
vlemos
The administrator has disabled public write access.

ajax-complete event on jdomAjax 06 Jan 2017 15:23 #14921

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Not for the moment.
We are almost there, but still a lot to do.
I must achieve the work in proper order because the Ajax search need some requirements to be more clean, otherwise it would be a mess.
It must be written properlty

The milestones of the roadmap are first :
- ORM (done !)
- Fields native Joomla + Ajax field (brand new) - [on a good way]
- Filters layout [almost finished, waiting to finish fields]
- Then, the ajax search (using a layout for HTML results)

I have many other parralel works, this is not the complete roadmap, so you can imagine it can take time.
For instance, ORM was designed for that ... helping the fields and other model queries to be more simple to instance.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: vlemos
Time to create page: 0.065 seconds

Get Started