jQuery SmartWizard submit with AJAX

Dear all,

I'm a beginer with Drupal.

I've created a page with a custom node (using a custom template) who's insert a SmartWizard on the page.

All is working fine except that I didn't know how to handle the submit in Drupal.

I've created a simple module.

I've implemented the mymodule_menu with :

<?php
  $items = array(); 
 
  $items['url/used'] = array( 
    'title' => t('Hello world'), 
    'type' => MENU_CALLBACK,  
    'page callback'    => 'my_funct', 
    'access arguments' => array('access content'), 
  ); 

  return $items; 
?>

I've created the function my_funct :

<?php
function my_funct() 
{ 
  $firstname = (string)$_POST['firstname'];  
 
  drupal_set_message(t('Test ') + $firstname); 
 
  $data = array(); 
  drupal_json_output($data); 
}
?>

On the JS file, I've modified some lines :

function onFinishCallback(){ 
    if(validateAllSteps()){ 
        var datastr = 'firstname=' + jQuery("#firstname").val(); 
        //jQuery('form').submit(); 
        jQuery.ajax({    
            type: "POST", 
            url: "/url/used", 
            data: datastr, 
            cache: false, 
            success: ajaxCompleted, 
        }); 
    } 
} 

 function ajaxCompleted() { }

But no message (drupal_set_message) appears when I clicked on Finish.

Are you brand new to Drupal? Join Acquia's "hello drupal" free course online!

At Acquia, we developed the free "Hello Drupal" course to help local Drupal communities welcome in new members who were curious about Drupal.

Read more here to find out what "Hello Drupal" is: http://training.acquia.com/hellodrupal

However, we are aware that not everyone has access to a vibrant local community. Our partner, Telamenta in South Africa can appreciate that as well, with a geographically dispersed population. That is why Patrick Frickel and I are facilitating Hello Drupal online for the first time.

Who is it for? This is for people who have never used Drupal before. Please pass this invitation along to anyone you know who is brand new to Drupal.http://learndrupal7.drupalgardens.com/

Who is it not for? If you know what a module is, and you've made content types and views before, you might find this course a little slow for you.

dynamic gmap macro and automated creation of content

Hello,

I'm a german student and want to realize a webservice which allows users to upload KML-files and show these informations in GoogleMaps.

So, i've done following:
I created a content pane with the format "extended gmap" and set the "gmap macro" to a static value
("[gmap |overlay=kml:http://randomurl.de/kml9.kml]";i don't want to show my own url here for the moment).
This content pane is included into a panel and it shows correctly the map with the right KML-overlay. The panel is shown when the right path is given and i am aware of choosing parameters/context from the url.

Unfortunately, this isn't all i want to do. I want the content pane to fill the url in the macro dynamically with an argument/value. In best case the value is provided by a parameter from the url. So the map displays a given route for a specific user and decides which route has to be shown. The decision should be depending on the url.

The reason is that the number of uploaded KML-files may vary from user to user and the user should choose which KML he wants to see by clicking the link for the given KML. My thought was to create those links dynamically in the moment when a KML is uploaded. The link should provide the name of the KML-file for the content pane.

I hope you understand my problem. I summarize:
- Am I able to fill in the gmap macro dynamically?

The theme changes after submit or update

Hi,

Sometimes when I submit a form in an admin page, for exemple in content type manage display or save a view or a configuration, the admin content page is reloaded with the default theme and not the admin theme.

I use seven for the admin theme and sky is my default theme.
the module overlay is disabled,
and "Use the administration theme when editing or creating content" is checked .

an exemple :
if I go to http://localhost/admin/structure/types/manage/article/display
seven theme is loading
After submit the url is the same but now this is the sky theme that is loaded ??
If I submit again it keeps sky theme. If i reload, now it's the seven theme.

I don't understand what happens.

How can I track who call the theme and how drupal knows wich theme to call ?

Did you meet this bug, is this a misconfiguration or a confic module who can do that?

note: this happens also with bartik

Thanks

PS : my list's module

Administration menu 7.x-3.0-rc1
Advanced help 7.x-1.0
Author Pane 7.x-2.0-alpha1
Backup and Migrate 7.x-2.2
Bulk Export 7.x-1.0-rc1
Calendar 7.x-3.x-dev
Chain Menu Access API 7.x-1.0
Color 7.9
Comment 7.9
Contact Forms 7.x-1.2
Content Notifications 7.x-1.0-alpha1
Content type groups 7.x-1.1
Contextual links 7.9
Count Results 7.x-1.x-dev
Custom Breadcrumbs 7.x-1.0-alpha1
Custom content panes 7.x-1.0-rc1

Can't clear cache - Need direct link to "clear all cache" button

Whenever I try to go to any of the admin sections, I get the following error:

PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: DELETE FROM {cache_bootstrap} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => bootstrap_modules ) in cache_clear_all() (line 169 of xxxxxxx/includes/cache.inc).

Is there a way to clear the cache w/o going through all of the links in the admin section?

how to have a expanded menu only if the menu is selected?

I have menu like this:
- Main menu item 1
- Main menu item 2
-- submenu item 1
-- submenu item 2

I though that if "Show as expanded" checkbox is unchecked in "Main Menu item 2" then when I click on "Main menu item 1", I will see:
- Main menu item 1
- Main menu item 2
but when I click on "Main menu item 2" I will see:
- Main menu item 1
- Main menu item 2
-- submenu item 1
-- submenu item 2

but that way don't work in my installation. So how to achieve that functionality?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x