0XHvn

display preview of an image without uploading to the server using javascript

All of us might be tried to load preview of an image which is to be uploaded to the server. Previously we can’t do this without uploading that particular file to the server. Now the latest versions of most of the browsers supports FILEREADER Web API. Using this we can display the preview of an image file without uploading to the server, using Javascript. The Javascript code given below:

 

Read More

get_file_size

Get size of a File when we selected to upload using Javascript

A simple method to get the size of the file selected which is to be uploaded, using JavaScript.

 

Read More

credit card validation using regular expression

Regular Expressions for Credit Card Validation – Javascript and PHP

Hi,

Regular expressions for validating all types of credit card numbers.

 

 

Read More

Positioning pager of JqGrid

Here, I’m going to explain changing position of navigation bar including pager of JqGrid. I have provided the default JqGrid configuration below,

As per the above default configuration, JqGrid will look like as below,

oie_1318151523xwGWA

If you want to change the position of the navigation bar to above, add toppager:true attribute to the above configuration. And in this case you don’t need to define the <div id=”divPagerPlanList”></div> and use pager: “#divPagerPlanList”In this case the the id of the pager will be list_toppager. Refer the changed configuration & image below,

oie_13181733Q2a3z3q9

Then, if we want to get the navigation bar on both top and bottom, do the first step as specified above. After that add cloneToTop:true option as follows,

jQuery(“#tblPlanList”).jqGrid(‘navGrid’,’#divPagerPlanList’,{cloneToTop: true, del:false,add:false,edit:false,search:false});

OR

jQuery(“#tblPlanList”).jqGrid(‘navGrid’,’#pager’,{cloneToTop: true, del:false,add:false,edit:false,search:false});

Refer the changed configuration and image below,

oie_13182447TK42munA

Read More

MathJax api for rendering MathML

I was seeking a Javascript api to render MathML which supports in all modern browsers, and I found a Javascript open source api called MathJax to render MathML very well. It is very easy to configure MathJax.

 To download the latest version of MathJax, click here.

To get the detailed documentation and further details, please click here.

Read More