Ajax is a group of interrelated web development techniques used on the client-side to create asynchronous web applications.
2
votes
1answer
274 views
add #ajax property to email field in node add form usion hook_form_alter
I've tried to add the property "#ajax" to email field but It dosen't work,
I've tried all this :
$form["field_user_email"]['#ajax'] = array(
'callback' => 'user_ajax_check',
'wrapper' ...
0
votes
0answers
65 views
Paginating an Ajax db query
I need to make a complex sql query using Ajax; if i do not use Views, which is the best way to do it in Drupal? I also need to handle pagination.
3
votes
1answer
788 views
Calling a javascript function from a form item ajax callback?
I am working on a project and I think I am stuck on this. I have a form that I want to add points to a map as users edit it.
Here's a rundown on how the form works:
The user chooses a number (1-10) ...
0
votes
1answer
271 views
How to show the content on ajax or Jquery lightbox
I have created views custom template file for one of my view and works fine. And how can i show fields content(second in the below code) on Lightbox popup box when the user clicks on title field.
...
1
vote
1answer
293 views
AJAX callback not added using form_alter
I want to perform a AJAX callback to check the value of a custom field during user registration. Because the form is already built, I need to use hook_form_alter.
But, no callback is added using ...
0
votes
0answers
629 views
using Ctools modal with form #ajax error NS_ERROR_XPC_BAD_CONVERT_JS
I'm using ctools modal for my form and now I need to create dependent selects on form.
On first page load all works fine, but when i chose anything in select #ajax callback called and chandes the ...
0
votes
1answer
75 views
alter ajax callback
Is there a way to alter an ajax callback from a form? I need to add a custom command after the existing one.
Or to alter the existing command defined in the js file?
Thanks
1
vote
0answers
370 views
500 error on Drupal 7 install?
Trying to install the new Drupal-COD Drupal 7 distribution, but got this error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows
Specifically see this screenshot.
...
0
votes
0answers
114 views
Running JQuery before AHAH submission
I'm really stuck with a form that I am building. Basically I have 3 select boxes,
Project
Consultant
Work Agreement
The selection of Project populates Consultant and the selection of Consultant ...
0
votes
2answers
235 views
How to create popup for email link with major email provider links?
Check out this new feature craigslist implemented. WHen you click on this button (like in the link below) that says "reply to this post", it pops up with this popup that shows the different email ...
0
votes
0answers
96 views
Manipulating the ajax output of an exposed-filters View
I have a simple view designed to retrieve a few fields from one of my content types. My design allows users to filter the output based on a few criteria and, to achieve this, I've exposed some of the ...
1
vote
0answers
197 views
Undefined index: #ajax in ajax_form_callback()
When using ajax for drop-down list, I receive the error message "Undefined index: #ajax in ajax_form_callback()". This comes from the Drupal core. What I noticed when debugging this error was that the ...
0
votes
0answers
173 views
Drupal search api ajax module returns no results
I have Drupal running Apache Solr, using the Search API and all runs fine. I am attempting to get the Search API ajax module to work.
I have a search page setup at /new; if I search for test it ...
0
votes
1answer
187 views
Does #AJAX work on the body field?
Does the #AJAX FAPI property work on the body field? I've got it to work with things like submit buttons and textfields such as the title. When I alter the node edit form, and attach an #ajax array to ...
0
votes
1answer
111 views
Is it possible to retrieve partial forms?
Is it possible to retrieve only parts of a form for display, that is, only certain form elements?
I am looking at the stack for building the node form, and so far the functions I've seen work with ...
0
votes
0answers
168 views
Drupal AJAX form giving error
I have modified the user_profile_form form to include some fields for the users address. The user can add many addresses and therefore I have made a button which adds address fields to the form using ...
1
vote
2answers
3k views
Rebuild form in AJAX callback
I've got a simple form which I've added a little AJAX to. The form simply let's people add users to a list. That is, I've got a textfield where people can enter an e-mail address, and that e-mail ...
0
votes
1answer
293 views
Using hook_menu() and hook_permission() to control access
How does one limit "what" can access a page. I understand how to use hook_permission() to set user permission based on a role to control access to hook_menu() items. However, what if I have a ...
2
votes
1answer
2k views
Drupal 7 - How to get AJAX response displayed in a ctools modal?
I want to create a ctools modal popup when a button is pressed.
function custom_form( $form, &form_state ) {
$form['btn'] = array(
'#type' => 'button',
'#value' => t('add'),
...
0
votes
1answer
182 views
How to make textfield with ['#ajax']['keypressed'] = TRUE trigger only on click and not on blur?
When I specify ['#ajax']['keypressed'] = TRUE for textfield, trigger runs not only when I click ENTER (as it is mentioned in documentation), but also when textfield loses focus (must be blur event in ...
4
votes
1answer
337 views
Does the Drupal FAPI support more than one AJAX callback?
I am using FAPI's AJAX property to save nodes asynchronously. When the associated AJAX callback gets called, it gets passed the $form and $form_state parameters respectively. I then simply call ...
0
votes
1answer
99 views
Why does drupal_session_start fail after a user clears cache then logs back in?
I'm writing a document management module which has come pretty far and is almost ready for a final review and release, but I've found a really strange authentication issue that is requiring a gross ...
0
votes
0answers
195 views
Drupal Webform Table Output
I'm currently developing a module for Drupal 6 to output my webform entries to a table that can be filtered and searched.
I've got an AJAX callback function that returns my sql query but I can't ...
0
votes
0answers
209 views
Filter Views list based on Gmap display
We have a Drupal 7 site using Location + Views + Gmap to display locations. The map is a views page display with an attachment display showing a table list of the nodes. Nothing new here.
The client ...
0
votes
0answers
123 views
Views exposed filters via AJAX on AJAX LOADED page
I have a page that is loaded inside a div with ajax. The exposed filters on that page does not submit via AJAX after that (on the stand-alone page they work fine).
I call ...
0
votes
0answers
123 views
6 - Ajax module: altering form after submission
I am using Ajax module in Drupal 6 to ajaxify my simple contact form. It works fine, the form is ajax-submitted and validation errors are displayed correctly, but I can't figure out a way to alter my ...
0
votes
1answer
2k views
“An AJAX HTTP error occurred.HTTP Result Code: 200”
I'm new to Drupal, and I'm working with a Drupal site that someone else wrote. From the admin menu, when I go to Structure -> Pages -> Edit Content -> Gear Menu -> Edit (or Settings), Drupal throws up ...
0
votes
0answers
99 views
How to automatically fill in a form on click?
I have a very simple form (FormAPI, not Webform) and the behavior when clicking the submit button is to both send an email and insert the form values into the database.
Under this same form, I have a ...
0
votes
1answer
142 views
Custom VBO action fails silently / works with AJAX error in Views Admin
Here is an action I need to use with VBO:
/*
* Implements hook_action_info()
*/
function ams_action_info() {
$action = array(
'ams_archive_action' => array(
'type' => ...
2
votes
2answers
1k views
Ajax errors on upload fields
I have an image field that allows a single image to be uploaded. The selection works, but if I click upload, I get an AJAX error. If I just submit without uploading first, the image is uploaded ...
0
votes
1answer
171 views
Simple AJAX callback
I'm looking to a way to make a call to a PHP function in my Drupal 6 module, and return the result asynchronously to the page.
I'm familiar with jQuery AJAX, but I don't understand how to post to a ...
1
vote
1answer
580 views
Remove form elements with ajax
i make a form with form loop as i am setting the $form_state['number'] for the fields count.
i want to remove a full row after clicking on remove button in front of row by taking row id. so i want to ...
2
votes
1answer
256 views
Unset the “please wait” in drupal commerce
I've got a product with different taxonomy like "S" "M" "L".
When you change the size in the display product, it shows the ajax div
"Please wait..."
I've tried
function ...
0
votes
1answer
142 views
display 2 tables with checkboxes by ajax button
I am altering a form and placing a new 'button' . On the press of the button, using the #ajax property , I want to display 2 separate tables with checkboxes for each row. Each table has separate data.
...
1
vote
2answers
1k views
How to use Drupal.ajax() to update #content div on <a> click?
I'm trying to update the #content with AJAX. I've found the Drupal.ajax function and tried to use it with this code, copied from Views module but modified:
var base_element_settings = {
'event': ...
0
votes
0answers
284 views
drupal_get_form on Ajax callback returns this javascript error: “TypeError: element_settings.url.replace is not a function”
Given this code:
/**
* Implements hook_form_FORM_ID_alter().
*/
function store_form_uc_product_add_to_cart_form_alter(&$form, &$form_state, $form_id) {
$form['actions']['submit']['#ajax'] ...
0
votes
0answers
46 views
UC Ajax Cart does not play nice with UC Discounts Alt
The problem is that after updating ajax cart with discounted products information about discount dissapears. Here I've found a way to get it work in block (http://drupal.org/node/1209344) but still ...
0
votes
1answer
168 views
loading nodes with Ajax/jQuery
Assume that we have a list of titles on the left and a div on the right side of the page that displays posts. when I click one of the titles it first removes content of that div and then loads node ...
1
vote
2answers
128 views
Is there a way to submit a form on an element's #ajax?
given a form like this:
function awesome_form() {
$form['select'] = array(
'#type' => 'select'
'#options' => array(
'hello' => t('Hello'),
'good-bye' => ...
1
vote
1answer
91 views
Getting the base drupal dir in JavaScript
I am writing a module that does ajax calls through the uses of javascript (not the Drupal ajax engine) to its Drupal installation, which in my case is {host}/drupal7.
My Ajax call should call ...
0
votes
0answers
187 views
Can't pass the data by ajax callback function
i use an ajax button to create a new (validate) textfield. But in my ajax function, i want to get the data form the (cellphone) textfield.
How can i do that?
Thank you very much!
function ...
0
votes
0answers
97 views
server error on custom content type ajax form
i have created a custom content type 'company' in drupal 7.
i have installed ajax_example from http://drupal.org/project/examples. when i click the ajax checkbox added with this module i have two ...
1
vote
0answers
194 views
Using ajaxcomplete in D7 to parse links
I am using two themes, one which is Mobile jQuery based that is presented to any mobile user. Also, I am using a jQuery lightbox module that is enabled for visitors on the desktop site to view a ...
0
votes
1answer
99 views
Views body field pop-up not loading and preview not working
Recently we have moved our website from our own hosting to Pantheon. Since we've made the move the Views body field pop-up won't load anymore. Pop-ups for other field may or may not load. Also the ...
2
votes
1answer
1k views
Can't get ajax callback and submit from the same form to work
I am building a facebook-like notification system. An icon somewhere in the page that shows you how many notifications you have and if you click on it you get a list of your notifications.
Since we ...
0
votes
3answers
787 views
Using AJAX in menu and menu tab links
I have a few pages with sub pages as tabs. Each pages are in a custom menu. I'd like to convert the menu links to load each page using AJAX, is this possible?
I know how to load a page using a ...
1
vote
2answers
1k views
Need help for Drupal 7 Ajax Add more form elements
$form['feedbackmarkup']['feedback']['num_domains'] = array(
'#type' => 'hidden',
'#default_value' => 1,
);
$num = isset($form_state['values']['num_domains']) ? ...
0
votes
1answer
144 views
Adding Ajax to Book navigation block
I am using book navigation block which contains links to content of BOOK.I would like add ajax functionality to this links.
I tried adding use-ajax class to this links.But i was unsuccessful.
Please ...
0
votes
1answer
182 views
form-state has values from former ajax lookup in validation and submit function
I have a form where many things happen per ajax request as e.g. a lookup of field values which will be pre-filled on button click
Most of the things work fine but there is one problem when ...
0
votes
0answers
399 views
Change values for tableselect items using #ajax to submit form
I have a form with a dropdown list of available actions and a tableselect element, and on form submission, the action selected in the dropdown is performed on the selected items in the list (just like ...
