Category:

ToolBar menu with Image,Text and CheckBox

Here is a simple XML menu file in which help to add icon, text and checkbox in your toolbar menu in your android application. <?xml version=”1.0″ encoding=”utf-8″?> <menu xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto”> <!– Settings, should always be in the overflow –> <item android:id=”@+id/action_settings” android:icon=”@drawable/ic_cutlery_white_26_32″ android:title=”” app:showAsAction=”always”> <menu> <group android:checkableBehavior=”all”> <item android:id=”@+id/top” android:checked=”true” android:enabled=”true” android:icon=”@drawable/ic_chef_cap_red_26_32″ android:title=”Cooking Now” app:showAsAction=”always|withText” /> <item android:id=”@+id/bottom” […]

Continue Reading
Posted On :
Category:

Post form data to server in AngularJs

Simple tip to send your form data to server using angular js and get that data in $_POST variable <html> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script> <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js”></script> <script type=”text/javascript”> var app = angular.module(“myApp” , []); app.controller(“sendForm” , function($scope, $http){ $scope.saveData= function(){ $scope.signError = false; $scope.signSuccess = false; var request […]

Continue Reading
Posted On :
Category:

Print form input key value using javascript

This is a a simple code to check form input fields names and its value using javascript for( var i=0; i<document.forms.FORM_NAME.length; i++ ) { var fieldName = document.forms.FORM_NAME[i].name; var fieldValue = document.forms.FORM_NAME[i].value; // use the fields, put them in a array, etc. // or, add them to a key-value pair strings, // as in regular […]

Continue Reading
Posted On :
Category:

Key value pair in Angular Js

This is very simple and useful tip for those who want to use associative array in angular js. In this i an show you how to dynamically generate menu using angular js which have menu name and menu link. Sample Code <html> <head> <title>Angular JS</title> <script src=’https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js’></script> </head> <body ng-app=””> <div> <ul ng-init=”menusLinks=[{‘#intro’: ‘Intro’},{‘#one’: ‘What […]

Continue Reading
Posted On :