Hi ,

U see , I am creating the custom form, the form contain 3 fields, when i
submit the form , the page is reloading, so here i want to stop

The page reload, so i want to use the JQuery , bcoz we can stop page reload
using jquery,

So here i need ur help the below code is my custom module code,

tell me where i call the Jquery,

this is my form

function cityForm(){


    $form['txtWhere'] = array(
     '#title' => t('Where'),
     '#type' => 'textfield',
     '#description' => t(''),
     '#required' => TRUE,
    );

    $form['name'] = array(
     '#title' => t('Check-In'),
     '#type' => 'textfield',
     '#description' => t(''),
     '#attributes' => array('class' => 'jscalendar'),
             '#jscalendar_ifFormat' => '%Y-%m-%d %H:%M',
             '#jscalendar_showsTime' => 'true',

    );

    $form['txtChkOut'] = array(
     '#title' => t('Check-Out'),
     '#type' => 'textfield',
     '#description' => t(''),
     '#attributes' => array('class' => 'jscalendar'),
             '#jscalendar_ifFormat' => '%Y-%m-%d %H:%M',
             '#jscalendar_showsTime' => 'true',
    );

    $form['guest'] = array(
        '#type' => 'select',
        '#title' => t('Guests'),
        '#options' => array(
        1 => '1',
        2 => '2',
        3 => '3',
        4 => '4',
        5 => '5',
        ),
        '#default_value' => '1',
        '#description' => t(''),
        '#required' => TRUE
    );

    $form['rooms'] = array(
        '#type' => 'select',
        '#title' => t('Rooms'),
        '#options' => array(
        1 => '1',
        2 => '2',
        3 => '3',
        4 => '4',
        5 => '5',
        ),
        '#default_value' => '1',
        '#description' => t(''),
        '#required' => TRUE
    );

    $form['submit'] = array(
       '#type' => 'submit',
       '#value' => t('submit')
      );
    return $form;

}
This is genral form with submit action, if we process this form,  If u
submit the form, the page get reload,

So i dont want to reload the page, at the time of form submit,

So u please  add the Jquery , and stop the page refresh


2008/11/11 bharani kumar <[EMAIL PROTECTED]>

> Thanks for reply,
>
> I want to integrate the Jquery in drupal
>
> Am using the drupal 5,
>
> Can u send any sample  module ,
>
> that sample module must contain  the JQuery functionality ,
>
>
>
> On Tue, Nov 11, 2008 at 9:22 PM, Eric Martin <[EMAIL PROTECTED]> wrote:
>
>>
>> Can you provide more information?
>>
>> - What version of Drupal are you using?
>>
>> - What are you trying to do?
>>
>> - What have you tried so far?
>>
>>
>>
>> On Nov 11, 6:38 am, "bharani kumar" <[EMAIL PROTECTED]>
>> wrote:
>> > Hi
>> >
>> > Any one please tell me, how to use the jquery in Drupal,
>> >
>> > --
>> > உங்கள் நண்பன்
>> > பரணி  குமார்
>> >
>> > Regards
>> > B.S.Bharanikumar
>> >
>> > POST YOUR OPINIONhttp://bharanikumariyer.hyperphp.com/
>>
>
>
>
> --
> உங்கள் நண்பன்
> பரணி  குமார்
>
> Regards
> B.S.Bharanikumar
>
> POST YOUR OPINION
> http://bharanikumariyer.hyperphp.com/
>



-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/

Reply via email to