Ajax is a group of interrelated web development techniques used on the client-side to create asynchronous web applications.

learn more… | top users | synonyms

0
votes
0answers
21 views
+50

How to add multiple products to cart at the same time with attributes

I have different view blocks that displays multiple products on the same page, each product has their own attributes such as product bundle and custom line item, these serves as an option set / ...
0
votes
0answers
5 views

How can I validate a fieldset or individual fields with ajax?

On my user registration form I have multiple fieldsets, and I want to validate each fieldset individually before moving to the next one. Kind of like a multipage setup, but all on one page. Is there ...
1
vote
0answers
19 views

How to use form ajax so a click on checkbox “A” posts the content of textfield “B”?

I'm trying to get the value of textfield "B" when checkbox "A" is toggled. Both fields are wrapped in a fieldset who's content is replaced by the callback output. So far I can get both fields to ...
0
votes
1answer
4 views

Is there an Authcache load event for fragments?

I would like to create a callback javascript function to fire when one of my Authcache fragments is loaded via AJAX. Is there a way to hook into this event? Thanks.
1
vote
1answer
12 views

Drupal 7 Simple Ajax Module returning 404

I am trying to do a simple Ajax call in drupal 7. But i get a 404 not found. I tried with another drupal install and it worked. Here is the list of the installed modules : CKEDITOR, ctools, entity, ...
0
votes
0answers
5 views

ajax(jsonp) validation return boolean for using in jquery validation plugin within Drupal

I'm trying to do a jsonp call to backend and validate a unique number. I want the success callback to return true/false since the jQuery validate plugin expects a boolean value to display error ...
0
votes
1answer
31 views

Owl Carousel 2 switches to default position after Ajax call

I'm a real noob at js so I hope I'll find working solution to solve my problem. I'm working on Drupal 7 project based on Porto template v.2.1 using Dupal Commerce module. I've implemented Owl Carousel ...
1
vote
1answer
11 views

How can I programatically add the default AJAX throbber to a form submit?

I'm trying to add the AJAX throbber in core to a form submit button, specifically the Private Message module new message page. Here is my code: function ...
0
votes
0answers
13 views

Drupal form ajax and select stylization?

I'm trying to make ajax select, but I'm using selectBox for form and I'm not doing click on form element. How can I done this? $form['choice_wrapper']['format'] = array( '#type' => 'select', ...
0
votes
1answer
25 views

Invalid datetime format for a field never submitted?

I'm working my the edit page for my mobile app which is fetching data from a Drupal site. I'm fetching data, I'm editing it, and submitting it. However, when submitting back, I'm getting Internal ...
0
votes
0answers
21 views

Users Unable to Log on to Site Due to Infinite Loop (Edited)

When any users attempt to log on to site they are redirected to 'log on page' infinitely with no error message. Error log shows 1 error. The error persists as follows: '20-Apr-2016 21:52:37 UTC] ...
-1
votes
0answers
15 views

Drupal Ajax event not work

just why this not work ? I've done something more complex but suddenly everything won't work... It's a simple button with his text update when we click on it <?php /** * @file * Food Truck ...
0
votes
0answers
12 views

How to return values to widget form from view in ctools popup?

I'm writing custom field type and widget based on it. It allows to create custom entities from node page and add node references on existing nodes. There are no problems with custom entities they ...
1
vote
0answers
23 views

Views Exposed form in block : how to add a ajax results counter?

I implemented a view as following : a first page display with an extensive exposed filters form (Better exposed filters), ajax enabled, let's call it the landing page a clone of it, in a second page ...
0
votes
0answers
8 views

How to pass query parameters to paged table using PagerDefault

I have a custom report that generates a report in table format as a marup element in a form, and I have it paged using $query->extend('TableSort')->extend('PagerDefault')->limit(50) I also ...
0
votes
2answers
37 views

How to do something BEFORE a view is updated via ajax submit button?

I have a view with exposed filters and Ajax activated. I would like to validate my exposed filters values before my view is updated by the submit button. The following code works without Ajax, but ...
0
votes
0answers
15 views

Pass value of form field in the url (params/$get)

I have created a form (with entityform) and wants to pass the value of the first field in the parameters of the url. This value is useful for update the other fields of the form. Is there a method to ...
0
votes
1answer
22 views

Submitting a form with AJAX causes page reload but only on mobile

I am submitting the user profile edit form by hooking the user profile edit form like this: $form['actions']['submit']['#ajax'] = array( 'callback' => 'user_profile_submit', 'wrapper' => ...
1
vote
0answers
14 views

Drupal Form Ajax not updating form on first click

function _ajax_ticket_info($form,&$form_state) { $subscriber = $form['info']['ticket']['subscribe']; _ticket_subscribe($subscriber['#value'],$subscriber['#name']); // Dunno if this is ...
0
votes
1answer
23 views

How do I fill form elements via onblur events?

I have a user form in which I have to fill all information related to a user. I have only the email address, and I'd like all other fields to be filled when I enter the email address by using the ...
0
votes
1answer
24 views

Drupal 7: Drop down triggering image_button callback

I have a custom form with 2 dropdowns which trigger an ajax callback on change and change the html inside a wrapper. If I use a submit input with this form which has its own submit callback function, ...
0
votes
0answers
9 views

ajax calback render form

I've problem when render form using ajax. In my case link which should replece by form after clicking. But when I use form I have "Synchronous XMLHttpRequest on the main thread is deprecated because ...
0
votes
2answers
26 views

Drupal 8 - Fill select options based on previous select

I'm trying to get the hang of Forms'N'Ajax in Drupal 8. I have a classic problem with my selects in D8: $form['manufactureYear'] = array( '#type' => 'select', '#title' => ...
0
votes
1answer
23 views

Drupal 7 Ajax Form, add elements dynamically to a fieldset

I have the following form: $form['#tree'] = TRUE; $tasks = array( 'Julia', 'John', ); foreach ($tasks as $task_key => $task) { $form['task_fieldset'][$task_key] = array( ...
0
votes
0answers
29 views

How to get main page content by path?

I can load other blocks by using block_load function. But if I use block_load('system','main'), I get nothing, because this block is page-specific. So how can I get content of "Main page content" ...
0
votes
2answers
35 views

Views slideshow + ajax content

if there any solution for this? I need to do views slideshow with content loading (with ajax).
0
votes
1answer
95 views

Drupal node form, validates fields with #access = FALSE after ajax image upload

I have a node form for a content type rendered using drupal_get_form(), I wanted to hide some fields so I altered this form and set attribute #access to FALSE in order to hide it and not validate it. ...
0
votes
1answer
29 views

Clicking reset in Views UI causes PDOException Error

I have a searchable view created that returns the following error when I click to "reset" the search query. It only occurs when resetting a search from the search terms field. An AJAX HTTP error ...
0
votes
0answers
35 views

how to get POST data value to menu function using ajax& jQuery in drupal

jQuery(document).ready( function () { jQuery("#edit-suspension").change(function() { var basepath = Drupal.settings.basePath; var key = jQuery(this).val(); ...
0
votes
0answers
25 views

How to show form error on failed login

I'm using ajax to submit core's user_login_block which is displayed in a popup. I'm using ajax_command_replace to show the error message if login fails. (If login is successful, I reload the page.) ...
0
votes
1answer
25 views

Change Fieldset Title in Form API 7

I have a fieldset with a title Design your ID Template. $form['myid_templates_editor'] = array( '#type' => 'fieldset', '#title' => t('Design your ID Template'), ); It looks ...
0
votes
1answer
29 views

How to include a form with Ajax callback using form_load_include

i have a location.inc file that have a form with a 3 level dependent dropdown. when i execute this file by itself the code works 100% fine. but now i need to call that form into another form ...
0
votes
0answers
15 views

Vews Load More remember scroll position and take user there after coming back from single node

im using this plugin for lazy loading images Views Load More. So i have page with photos that links to individual nodes, and im using lazy load on it, its a view that loads 15 items per batch, there ...
1
vote
1answer
19 views

Render an HTML in Drupal

I want to update a table everytime a table record is deleted. The function below tries to update my table by querying the latest records in my database and displaying it again. Javascript code: //A ...
1
vote
1answer
31 views

Using Bootstrap theme and anonymous user, ajax form submit results in “call to undefined function bootstrap_form_process”

Context We have a subtheme based on the Bootstrap theme and we're rendering a form inside of a modal. The submit button uses an ajax callback to handle form submission. Problem When logged in as an ...
0
votes
0answers
20 views

Auto submit ajax-enabled form on all form changes

A custom Drupal module is used to generate charts (with d3.js) out of data saved in nodes. The module provides a custom page which contains an ajax-enabled form (with default options) to configure the ...
3
votes
1answer
57 views

How can I create a custom ajax callback command?

I found different type of ajax commands like htmlCommand, invoke command etc. I want to create a custom ajax command that sets the response of ajax callback as the value of specifying markup in the ...
0
votes
0answers
19 views

Ajax framework from external file

I have created a custom module that use the ajaxcallbak in form and i call this module as block inside a external php in root installation The external file contains the script for calling the ...
0
votes
1answer
18 views

ajax_command_invoke adding a new item in a field collection

I'm using the field_collection module. A collection has a "custom field" I've created, which rely on a jQuery plugin. When I add another item in my collection, the jQuery plugin is no more invoked, ...
0
votes
1answer
41 views

Data not received on server in ajax

I'm trying to post data from ajax to php page which I made in the hook_menu, called "handler". So I have "domain.com/handler" which I try to do this in it: function handler(){ print_r($_POST); } ...
0
votes
0answers
16 views

On AJAX-Enabled Views the “Add to Cart” & “Add to wishlist” button does not work properly

On AJAX enabled Views with better exposed filters and view load more paging the Add to Cart button and Add to wishlist does not work properly. After an AJAX call, the add-to-cart form action changes ...
1
vote
1answer
49 views

Ajax callback return 500 Internal Server Error

file mymodule.inc : $items['ajax/channel/%/get-program'] = array( 'title' => t('get channel program by ID'), 'type' => MENU_CALLBACK, 'page callback' => ...
0
votes
2answers
84 views

How do I get the current field value in Ajax callback?

I m in a problem with drupal 8 ajax callbacking. I created a multivalue field for country - region listing as new field type using a custom module. In first selectlist i loaded all country codes.Set ...
0
votes
0answers
16 views

How do I change field handler_settings within hook_form_alter?

I have an entity reference field that is inside of a field_collection (D8) and I need to alter it's views arguments during ajax load to pass in the value from a preceding field on the host entity. I ...
1
vote
0answers
11 views

Calendar Block with node teaser display

Is this possible to create a calendar (using the Calendar module) with this functionality via Views: - Calendar is displaying month - days contain number (number of nodes in this day) - when I ...
0
votes
1answer
22 views

Why is my Drupal ajax form not populating the radio buttons

I have a form which send an ajax request to my server. The form is: function dokimi_add_to_list_form($form, $form_state) { $form = array(); $options=array( 'option1'=>'option1', ...
1
vote
0answers
25 views

View exposed filter block no alter form with ajax

I am trying to filter out the no results items in my exposed filters. (I know i can use selective filters, but in this case i can't use them). So i alter the filters with form_alter, check which ...
1
vote
1answer
41 views

How do I modify a core field to use Ajax and add markup?

I am still getting the hang of D8... I have some entity types with various reference fields. I need to ajax in other values from another node type when changing the value of the entity reference ...
0
votes
0answers
22 views

How to add jquery to drupal basic page [duplicate]

I want to add few jquery in my basic page of drupal website to call some api with parameter. Can any one explain me how can i accomplish this. $.ajax or $.post we can do right but its not happening in ...
1
vote
1answer
63 views

3 Level dependent dropdown. The 3rd list won't update

i'm trying to make a 3 level dropdown lists. Country -> State -> City. So far i got it working with 2 levels, Country -> State. But when i change state it doesn't give me the cities. I've been ...