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
4 views

How to fix field_collection_ajax save error?

I have Drupal 7.41, field_collection 7.x-1.0-beta10+1-dev, and field_collection_ajax 7.x-1.x-dev On the site I am admin of, we have a disease content type, and a part of each disease node is its lab ...
0
votes
1answer
21 views

Create Dynamic Textfield Form Elements Based From Database Values [on hold]

I have this code below: //Called by hook_menu in file myid.module function myid_inputting(){ return drupal_get_form('myid_inputting_form'); } In the form, I have a select form element that ...
0
votes
0answers
29 views

Ajax on custom route

Any Help would be appreciated : I've created a custom page via hook_menu in drupal 7 in which there is a custom form implemented (and additionnal features). I'm trying to implement an Ajax callback ...
1
vote
1answer
55 views

Why am I getting Access denied on PUT or DELETE? [on hold]

I'm making an ajax call to update a node like below, and I am getting PUT: http://www.example.com/services/node/924.json 403 (Forbidden). 403 suggests that user doesn't have permission, but I granted ...
1
vote
0answers
13 views

Views listing of nodes and node title as exposed filter

When I started this view I thought it would be simple… But it's not. I've an "Office" content type and a view (block) where are listed my "Office" nodes as teaser. First of all it could be great if ...
0
votes
0answers
8 views

Ajax form hidden default value not returning values when ajax runs

I have a custom where I need to render a calendar, but only shows the whole week of the current week. I've added an element for the date where I've set the default value to something like below ...
1
vote
2answers
97 views

How can I implement AJAX form submission?

My task is to submit contact form via AJAX and then to show "Thank you for submission!" message, loaded in place where the form was. So I need to ajaxify existing contact form. I found some examples ...
0
votes
0answers
12 views

Outbound url query token is breaking AJAX callbacks

I am running into a strange situation that I don't really understand. I am appending a query token to all outbound url query strings using hook_url_outbound_alter(). function ...
0
votes
0answers
13 views

Display a function's return value through AJAX response

I have this jquery ajax request below: jQuery.ajax({ type: 'POST', url: '?q=myid_query_db', data:{ 'db_server': 'postgres', }, }).done(function(o){ ...
0
votes
1answer
77 views

Create a “read more” button using AJAX in a Drupal 8 module

I'm working on a really simple module in Drupal 8 to get the hang of things. What it does (or rather, what the page I'm asking about in this question does) is grab some data of a bunch of simple ...
0
votes
0answers
23 views

Clicking on Place a Block in Drupal 8 Block Layout Page gives ajax error

Uncaught AjaxError: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /admin/structure/block/library/jethrosub?region=sidebar_first StatusText: Internal Server ...
1
vote
0answers
10 views

View Datasource - generate URL to Thumb and Full image

I am trying to create a view to generate JSON Data. Therefore I am using the "Views Datasource" module. All in all the view is a list of files (File Entities) and actually look like this: {"nodes":[{ ...
0
votes
0answers
16 views

AJAX Replace Glitchy on custom theme

I have a form in my module that uses an ajax callback to replace input fields. It's working on themes that come with drupal. However on a custom theme, it's glitchy. The replace happens, however the ...
0
votes
0answers
16 views

How to build ajax “Add More” form bean?

I had build plugin type Bean which used ajax load more form . But this not working ? How to fix or change my code . This file Class extends BeanPlugin class IconLinkSocial extends BeanPlugin { ...
0
votes
0answers
20 views

Reload same edit form but for another node by ajax

Ok, I have a page where are the following items: A select with the list of nodes An edit form for the selected node A display of the selected node When the select changes I want the form to be ...
0
votes
1answer
28 views

Views 7.3.1.3 ajax error

I am running a 7.41 with views 7.3.1.3 version and editing views causes ajax error? here is the current error code : an ajax http error code. http status :500 ...
0
votes
0answers
6 views

Adding #ajax to an existing dropdown menu

I'm trying to add the #ajax property to a dropdown menu on a node add form. If I add the following code to a hook_form_alter, the ajax triggers correctly (on blur the ajax circle spins next to the ...
0
votes
0answers
11 views

Views Accordion Closes When I Hit Next On Pager On Interior View

I have an issue where I have a view accordion and each row on the accordion has a view with a pager. When I hit next on the pager the accordion closes which is a very undesirable effect. Any ideas?
0
votes
1answer
30 views

Render form with ajax submit.

I have a custom form in a module, similar to this example: function mymodule_form($form, &$form_state) { $radio_options = array(...); $form = array(); $form["wrapper"] = ...
0
votes
1answer
20 views

In-place Views block field edits

I have a Views block showing the profile of a user. I would like to make it look like so: where there is a button next to some of the changeable fields, when clicked will make the field value a ...
0
votes
1answer
17 views

Ajax form in preprocess_node never triggers

In a preprocess_node hook, I try to insert a Drupal node_form form in my page. I do it with this function: function my_module_get_edit_form($selection) { drupal_add_library('system', ...
0
votes
1answer
36 views

AJAX Populated Views Exposed Filter

I'm re-building a travel website and need the trip search form to have the "Arrivals" select populated using AJAX once the departures has been selected to remove any empty search results. I have ...
0
votes
0answers
22 views

Empty canvas fields when ajax view filter applied

I have a views block of contents which include canvas field and I added an exposed filter criteria. In views block config I set "use ajax = yes" (filter form with a view as block need ajax). In the ...
0
votes
1answer
17 views

Managed file input is removing input values of appended input fields by ajax

I have a form with checkboxes that are calling ajax callback on checked. This ajax callback is appending another inputs: $form['expertise']['op-cat-'.$op_cat['id']]['op-'.$op['id']]['checked'] = ...
1
vote
0answers
22 views

How to unfocus button after ajax form was rebuilt?

I have a form that is completely ajaxified and when I submit the form the submit button stays focused. I have styling in place and it results in bad UX. How should I unfocus the button? Do I have to ...
0
votes
1answer
68 views

Drupal 8 Ajax Callbacks misbehaving when form element in table

I have a form containing the following element: $form['check'] = array( '#type' => 'checkbox', '#title' => t('Test'), '#ajax' => array( 'callback' => array($this, ...
0
votes
1answer
14 views

AJAX event returns same data always

So, this is a simple form, and what the ajax call back does here is that it returns the value of a field that's being changed. The problem is that, only the value of the first change is returned. If ...
1
vote
2answers
37 views

Dynamically add input field using #ajax

As the question says, im not clear on how to go about adding new input fields depending on values of certain fields in the form. I got as far as setting a callback and a wrapper, but i just can't ...
0
votes
0answers
15 views

Views ajaxSuccess calls added on each interaction

I have an ajax-enabled View set up in a panels page, with a Better Exposed Filters form that is set to auto-submit. I have a duplicated list of selected filter terms in the DOM, with the individual ...
1
vote
0answers
68 views

Ajax in blogForm: Form being submitted more than once

I'm currently building a Block Plugin for Drupal 8. Within the blockForm() is an autocomplete field which additionally uses an AJAX callback after the autocomplete is finished. In code it looks ...
0
votes
0answers
16 views

Querystring in Views ajax_view.js

I'm using Views 7.x-3.11 with Better Exposed Filters and Ajax auto-submit in a panels page, and running into some issues that seem to be stemming from code in Views/js/ajax_view.js. I want to make the ...
0
votes
0answers
10 views

Issue form submit after ajax_command_replace

I have an issue with sending a form. I have a form with some containers and 2 selects fields. The selects fields call the same callback who use "ajax_command_replace" to add some others fields and a ...
0
votes
0answers
25 views

ajax error during drupal installation

I'm installing drupal 7 on my windows 7 machine and I use WAMP. Thing is, at the end of the drupal installation I had the following error: An AJAX HTTP request terminated abnormally. Debugging ...
0
votes
0answers
11 views

Ajax - homepage not loading

I'm using ajax_links_api and every page is loading via ajax, except for the homepage. I can see response in "network" section of firebug, but it's not loading. How can I debug that? Thanks
0
votes
0answers
17 views

drupal_get_js(), when using AJAX

I’m using ajax_links_api and for some reason it doesn’t work as expected. When I load page through AJAX I want to include .js files which weren’t already included in a page using <script> tag. ...
1
vote
0answers
40 views

Drupal Commerce - trigger product attribute AJAX with javascript

I have a product type with Date and Time attributes. These are rendered on the Add to Cart form as select inputs and when they are changed they trigger an AJAX update of the form to show the relevant ...
0
votes
1answer
35 views

ajax form button click than drupal_set_message (Drupal 8)

I want button to drupal_set_message("some text"); in Drupal 8 use Drupal\Core\Controller\ControllerBase; class nc_registerController extends ControllerBase { public function content() { ...
0
votes
2answers
21 views

Jquery after ajax loaded in view

So I created a view listing all the users. I implement a search form with autosubmit function. The autosubmit works with an ajax script. Into my page view, I changed a few things in Jquery like this ...
0
votes
1answer
19 views

Ajax rebuild form is calling all the code from my form function

I have a form which when I click on on radio rebuild an element of the same form. Somehow when the ajax is called it's recalling everything from my form function. How can I force him to reload only a ...
0
votes
1answer
24 views

How to expose variable from php to js - and keep it updated?

drupal_add_js works to pass variables from php to javascript, and there are plenty of examples. But I want the variable to update without a new page request. I have a page request that kicks off some ...
1
vote
1answer
26 views

How to debug ajax in form?

I have a form that uses ajax submit "method", the ajax submit handler returns ajax response with complete form(the form has ajax wrapper outside of itself so no issue there) and it is not working for ...
3
votes
1answer
42 views

Drupal Commerce update price via ajax

Here are the lists of commerce modules I currently installed on my site Drupal Commerce Commerce Product Bundle Commerce Product Attributes I created a content type (main prod) that is referencing ...
0
votes
0answers
42 views

Displaying views as AJAX tabbed content

This is something for which I had used the Quick Tabs module of Drupal 7 but we've upgraded to Drupal 8 and now I need to recreate this functionality. Basically, on the homepage of the site we need ...
0
votes
0answers
10 views

Create a form with #ajax, but with 'no_cache'?

I have a use case where I want to create a form with: ['#ajax'], to load some element dynamically depending on the value of another element. Some values in the form array are not serializable, so ...
0
votes
0answers
19 views

Ajax Callback on Checkbox control only happening every other click

I have a form containing a Drupal 8 #table element, populated in a loop. Here is the relevant snippet of the buildForm method: $row["is_approved"] = array( '#type' => 'checkbox', ...
0
votes
1answer
28 views

How can I detect what control caused AJAX callback?

I have a form containing a table, which displays rows from a database table, and has a couple of editable fields, which is all working fine. I now want to make one of fields trigger an AJAX callback ...
0
votes
2answers
36 views

Add 2 form elements to Form via AJAX [duplicate]

I am newbie into Drupal. I want to add 2 form elements dynamically to existing form via AJAX based on particular condition. But in the examples I saw till now the AJAX callback defined returns only ...
0
votes
1answer
17 views

Why is AJAX pager in Views not recording the history

I have a listing of news, used with Views module in Drupal 7. I have activated Use Ajax in advanced section. So now the pager loads the content smoothly, without loading other page. That is nice, but ...
0
votes
1answer
39 views

Ajax callback on select box change event not working on second time

I am building a form with form API in a custom module. Certain fields should be populated based on the selected value of a dropdown. User will select the pre-entered profiles, based on which other ...
1
vote
2answers
62 views

Attached view ajax call (lazy load) with exposed filters

I'm using views with a main view and an attachment to put 2 views on a single page. Each view is in it's own Bootstrap togglable tab. Because I don't know how many people will actually switch to the ...