The Stack Overflow podcast is back! Listen to an interview with our new CEO.
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 72672

Use it for questions about JavaScript/PHP code to create asynchronous web applications.

2
votes
When you want to get the HTML of the table you must use the renderer service. In Drupal 8: $html = \Drupal::service('renderer')->render($form['table']); Or better, use dependency injection :) In …
answered Aug 16 by Jdrupal
0
votes
I took a look at the error log, it gave an missing arguments error from the page callback. So I found out that the problem was caused by the $value parameter, in the page callback, so I just removed …
answered Apr 22 '18 by Jdrupal
2
votes
It should be easily done like this: $form['submit']['#ajax'] = [ 'callback' => 'MYMODULE_submit_throbber_callback', 'progress' => [ 'type' => 'throbber', 'message' => NULL, ], ]; And then return $form in the callback; …
answered Jul 10 by Jdrupal
0
votes
I think that you can do it with jQuery. Add this code in your template: <iframe id="frame-id" src="" frameborder="0"></iframe> Add this jQuery: $("#SUBMIT-ID").click(function(e) { e.preventDefau …
answered Apr 22 '18 by Jdrupal
0
votes
I think the problem is that you only return the another-field in the ajax callback. You probably have to make a wrapper for the submit and the another-field. So you willl have: $form['ajax_wrapper … '] = array( 'submit' => array( // Submit button... ), 'another-field' => array( // Another field... ), ); And then return $form['ajax_wrapper'] in your ajax callback. Make sure to use $form_state['rebuild'] = TRUE; …
answered Aug 28 by Jdrupal
1
vote
You can do this using JS. Add a click event listener on the Add item button. When the button is clicked you set a message. Something like this should work: $('.add-item-class').on('click', function …
answered Oct 11 by Jdrupal
1
vote
I actually found the answer myself. Using the Better Exposed Filters module did the trick. From the module's description: Provide instant feedback by updating the View using AJAX whenever an exposed filter is changed. …
answered Jul 13 by Jdrupal