Question: I am new to Javascript and am trying to make a Javascript .click function. Upon clicking button id #btnTransfer, I want it to check against the listed account id value(s) and throw an error message if it matches a listed value. Here is the code im using. The user's input id #accountid is already printed on the webpage via asp, but is hidden from view. Any help would be greatly appreciated :)

```js
$('#btnTransfer').click(function () {
  if ($('#accountid').val() == "123456789") {
    popError("Error you cannot preform this action");
}
```

Answer: 
Just store the drawable id in SharedPreferences and refer it.

```
    // store drawable id in SharedPreferences
    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context);
    SharedPreferences.Editor editor = sharedPref.edit();
    editor.putInt("drawableId", R.drawable.btn_background);
    editor.commit();

    // Read from sharedPref and set background
    int drawableId = sharedPref.getInt("drawableId", 0);

    ImageButton imageButton = (ImageButton) findViewById(R.id.imageButton);
    imageButton.setBackgroundResource(drawableId);

```
Your'd better not store drawable id ,for every time compile your app, the id may be different.You could store drawable name in SharedPreferences and get those resources id by ResourcesUtils.

```
 public class ResourcesUtils {

        private static final String RES_ID = "id";
        private static final String RES_STRING = "string";
        private static final String RES_DRABLE = "drable";

        public static int getId(Context context,String resName){
            return getResId(context,resName,RES_ID);
        }

        public static int getStringId(Context context,String resName){
            return getResId(context,resName,RES_STRING);
        }

        public static int getDrableId(Context context,String resName){
            return getResId(context,resName,RES_DRABLE);
        }

        public static int getResId(Context context,String resName,String defType){
            return context.getResources().getIdentifier(resName, defType, context.getPackageName());
        }
    }

```