Jump to content

how to add a spinning .gif to an add function??????


Ibshas25

Recommended Posts

where do i add this gif for it to work. currently i added it to the actually add button but doesnt seem to work... any ideas

 

function useradd() { 
alert ("user add a geliyor");   
    //alert ("team add a geliyor");
	var username = $("#username").attr("value");
	var name = $("#name").attr("value");
	var surname = $("#surname").attr("value");
	var passwd1 = $("#passwd1").attr("value");
	var email = $("#email").attr("value");
	var phone = $("#phone").attr("value");
	var mobphone = $("#mobphone").attr("value");
	var issysadmin = $("#issysadmin").attr("value");
	var isuseractive = $("#isuseractive").attr("value");
	var data = 
         { 
	     "operation" : "useradd",
		 "username" : username,
		 "name" : name,
		 "surname" : surname,
		 "password" : passwd1,
		 "email" : email,
		 "phone" : phone,
		 "mobphone" : mobphone,
		 "issysadmin" :issysadmin,
		 "isuseractive" :isuseractive,
		 "recuser" :1
         }
       var dataString = $.toJSON(data);
       $.post('UserSearchPBT.php', { data: dataString}, useraddResult, "text");
   
}



function useraddResult(res)
{
  var obj = $.evalJSON(res);
  $("#successfailmessage").html(obj.SuccFailMessage);
  if (obj.SuccFail=="success") {
  $("#userid").val("");
  $("#username").val("");
  $("#name").val("");
  $("#surname").val("");
  $("#passwd1").val("");
  $("#passwd2").val("");
  $("#email").val("");
  $("#phone").val("");
  $("#mobphone").val("");
  $("#issysadmin").val("");
  $("#isuseractive").val("");
  $("#useradd").show('<img src="indicator.gif" />');
  $("#userlist").html("");
  }
  //userlistgenerate();
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.