Jump to content

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


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();
}

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.