Posts

JQuery - Custom Dialog

<html> <head>          <script language="javascript">               $(document).ready(function () {                        showDialogAlert('MyDialog', 'Hello', $('#myText'));                        return false;               });                function showDialogAlert(title, message, objectOnFocus) {                   $(document).ready(function () {                         $("#dialog").dialog("destroy");//clear dialog cache        ...

JQuery - Focus on "div" Tag

<div id="messageBox"></div> $('html, body').animate({ scrollTop: $('#messageBox').offset().top }, 'slow');

Android - EditText

g_editText = new EditText(this); g_editText.setText(""); g_editText.setEms(2); g_editText.setInputType(InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS); g_editText.setGravity(android.view.Gravity.CENTER); g_editText.addTextChangedListener(new TextWatcher() {                        @Override             public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {                     }                     @Override             public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {                     }           ...

JQuery - Add, Remove Attribute

function displayACCField(obj) {         if ($('#radio-cost-center').is(':checked')) {             $("#labelAccAssignment").html("Cost Center");             $("#textAccAssignment").removeAttr("disabled");             //call function showAccAssignment(type);             $("#imgF4AccAssignment").attr("onClick", "showAccAssignment('k');");             $('#imgF4AccAssignment').attr({                 alt: 'Select Account Assignment',                 title: 'Select Account Assignment',          ...

JQuery - Enable, Disable TextBox

>> Disable TextBox:   $ ( "#textbox1" ). attr ( "disabled" , "disabled" ); >> Enable TextBox: $ ( "#textbox1" ). removeAttr ( "disabled" );

C# - Entity Framework - Join Table

var _query = this.g_db_entity.PR_WEB_USER       .Join(this.g_db_entity.PR_WEB_AUTHORIZE_ROLE,       user => user.role_id,       role => role.id,       (user, role) => new { users = user, role_name = role.name })       .ToList()       .Skip((pageNo - 1) * this.g_page_size)       .Take(this.g_page_size); foreach (var row in _query) {       _m_user = new Models.User();       _m_user.Username = row.users.username;       _m_user.DeptPrefix = row.users.dept_prefix;       _m_user.FullName = row.users.full_name;       _m_user.ValidFrom = Convert.ToDateTime(row.users.valid_from);       _m_user.ValidTo = Convert.ToDateTime(row.users.valid_to);  ...

JQuery - iFrame in div dialog

>> Parent Window: Main.aspx function showStoreLocation(type) {          var _url = "getStoreLocation.aspx?type=" + type;          var _iframe = '<iframe src=\'' + _url + '\' width="100%" height="100%" frameBorder="0" style="margin:0px;padding:0px;" scrolling="yes" id="iframe" name="iframe"></iframe>';          $(document).ready(function() {                 $("#dialog").dialog({                    modal: true,                    height: 500,                    width: 350,      ...