I've this code for my AJAX script $(document).ready(function() { $("#submit").click(function(){ var acc = $("#accountNumber").val(); src = "pass.php"; $.ajax({ url: src, data: 'action=account&type=viewDetail&accNo='+acc, cache: false, type:'GET', success: function(data, textStatus, XMLHttpRequest){ if(data!=0) { // alert(data); $("#userInfo").html(""); $("#userInfo").css("display","block"); $("#userInfo").append(data); }else { $("#userInfo").html(''); $("#userInfo").append('<span class="alert-red alert-icon">Please Enter correct Account Number.</span>'); $("#userInfo").css("display","block"); } }, error:function(XMLHttpRequest, textStatus, errorThrown){alert(textStatus); alert(errorThrown);} }); }); }); This scripts loads data from server and while I want to retrieve another account information it takes time. So I want to display some spinner while the data being fetched. Anybody could help?

Member Avatar
Member Avatar
+0 forum 3

When users interact with your web page and processes, it is important to provide them with continuous feedback. Without the feedback, a user is left wondering if you page is actually processing work, frozen, or just not working. This is especially true when incorporating Ajax requests that take more than a few seconds for the process to complete successfully. For this reason, you will find that "spinners" or "progress bars" are used to display what seems to be the browser performing some work in the background. In reality, all that is really happening behind the scenes is that the web …

Member Avatar
+2 forum 0

I am trying to add new spinner below old one dynamically with click of a button. Also, I am adding button on the side of spinner dynamically. My problem is the spinners and buttons are added on top of each other. How can I add new spinner at the bottom of last one with every button click? Here is my code: public class MainActivity extends FragmentActivity implements OnClickListener{ SampleAlarmReceiver alarm = new SampleAlarmReceiver(); static EditText startTime; static EditText endTime; static EditText startDate; static EditText EndDate; View buttonRem; Spinner spinnerNew; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); startTime = (EditText)findViewById(R.id.EditTextST); …

Member Avatar
Member Avatar
+0 forum 2

I am trying to create an app to enter records into a database (SQLite) which includes an option field with data selected from a drop-down list box or Spinner. I can create the Spinner from a string array input from Strings.xml but I want to make the data 'user editable,' but cannot find a way to create it. The latest effort below stops after reporting it is switching to the database (at the declaration and initialisation of 'colurs.') [CODE] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDbHelper = new NamesDbAdapter(this); mDbHelper.open(); Log.d("onCreate", "Creating Edit screen"); setContentView(R.layout.names_edit); mConfirmButton = (Button) findViewById(R.id.confirm); …

Member Avatar
Member Avatar
+0 forum 1

The End.