source: extensions/GrumPluginClasses/js/markup.formMail.js @ 12215

Last change on this file since 12215 was 12215, checked in by grum, 13 years ago

fix bugs
bug:2160 - CategorySelector : extended description are not managed
+add some functions to GPCCore

File size: 1.5 KB
Line 
1/**
2 * -----------------------------------------------------------------------------
3 * file: markup.formMail.js
4 * file version: 1.0.0
5 * date: 2011-09-20
6 *
7 * JS file provided by the piwigo's plugin "GrumPluginClasses"
8 *
9 * -----------------------------------------------------------------------------
10 * Author     : Grum
11 *   email    : grum@piwigo.com
12 *   website  : http://photos.grum.fr
13 *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
14 *
15 *   << May the Little SpaceFrog be with you ! >>
16 * -----------------------------------------------------------------------------
17 */
18$(window).bind('load',
19  function ()
20  {
21
22    $('#iSubmit').bind('click',
23      function ()
24      {
25        var data = {
26              email:$('#iEmail').val(),
27              subject:$('#iSubject').val(),
28              msg:$('#iMessageContent').val(),
29              token:$('#iToken').val(),
30              ajaxfct:"public.contact.sendMsg"
31            };
32
33        $.ajax(
34          {
35            type: "POST",
36            url: "plugins/GrumPluginClasses/gpc_ajax.php",
37            async: true,
38            data: data,
39            success:
40              function(msg)
41              {
42                result=$.parseJSON(msg);
43                if(result.result)
44                {
45                  $('#iGpcFormMail').html(result.msg);
46                }
47                else
48                {
49                  alert(result.msg);
50                }
51              }
52          }
53        );
54      }
55    );
56
57  }
58);
Note: See TracBrowser for help on using the repository browser.