Saturday, January 20, 2018
jquery
- jquery-basics
- jquery-ui-datepicker-set-year-range-dropdown-to-100-years
- event_preventdefault
- jquerys-fail-method-takes-a-callback-function-as-an-argument-the-function-is-run-when-theres-an-error-in-the-ajax-r
- The serialize() method creates a URL encoded text string by serializing form values. You can select one or more form elements (like input and/or text area), or the form element itself. The serialized values can be used in the URL query string when making an AJAX request.
- Syntax $(selector).serialize()
best practices
- cdn
- ec2 cluster
- redis/memcache
- jenkins
- database cluster
- e-commerce
- sap hybris
- messaging server
- sms gateway
Tuesday, January 16, 2018
User Interface Design
- If we keep logic of visibility of controls in javascript ie in plain html then following are the disadvantages:
- anyone can copy the code
- somebody can mess up with the security and data integrity ie changing the values
- if javascript is disabled then mission critical application wont work
- the advantage is it is fast to work
Saturday, January 6, 2018
javascript debugging
- choose inspect element option by right clicking on the html element of the html page and view its details in the inspector window
- always open the console while running the javacript program. here the output or error is shown in the console as they happen
- always use console.log() function at appropriate places to check output.
- onclick-calling-two-functions-simultaneously
Friday, January 5, 2018
javascript
- demystifying-javascript-variable-scope-hoisting
- debugging code
- <html>
<head>
<script>
function abc(temp)
{
var x = document.getElementById("cmbMS");
var k=0;
if(temp==rbtnMale)
{
for (var i=0; i<x.length; i++){
if (x.options[i].value == 'widow' )
x.remove(i);
if(x.options[i].value=='widower')
k=1;
}//for
if(k!=1)
{
var option = document.createElement("option");
option.text = "widower";
x.add(option);
}
}//if
else
{
for (var i=0; i<x.length; i++){
if (x.options[i].value == 'widower' )
x.remove(i);
if(x.options[i].value=='widow')
k=1;
}//for
if(k!=1)
{
var option = document.createElement("option");
option.text = "widow";
x.add(option);
}
}//else
} //abc()
/*
if opposite present then remove it
if not present then add
*/
</script>
</head>
<body>
<form>
gender<input type="radio" id="rbtnMale" name="gender" value="male" onClick="abc(this)">male
<input type="radio" id="rbtnFemale" name="gender" value="female" onClick="abc(this)">female
<select id="cmbMS" >
<option value="neverMarried" selected>Never Married</option>
<option value="divorcee">Divorcee</option>
<option value="married">Married</option>
<option value="havingchildren">Having Children</option>
</select>
</form>
</body>
</html>
latest in technology
- typescript
- angular 4
- python
- visual studio code
- MEAN stack
- mongodb
- express
- angular js
- node js
Subscribe to:
Posts (Atom)