Salesforce | Refresh the parent window automatically on closing the child window

| By Webner

On closing child popup window (on click of a button), we wanted to refresh the parent window automatically to check the updates. We can refresh the parent window on closing the popup window by using javascript. Syntax : This is

PHP | Sorting Complex Multidimensional Array

| By Webner

Suppose we have a complex array like below: $products = array( array( ‘product’ => array(‘id’ => 1, ‘name’ => ‘Jquery tutorial book’), ‘product_details’ => array(‘cost’ => 10, ‘edition’ => ‘first’) ), array( ‘product’ => array(‘id’ => 2, ‘name’ => ‘javascript

How to create a dynamic div using Javascript

| By Webner

Here is sample code if you want to create a dynamic div using Javascript: <script type=”text/javascript”> divCount =0; function createDiv() { var divTag = document.createElement(“div”); var studList =””; studList += ‘<select id=”BOX_’+divCount+'” name=”BOX_’+divCount+'”>’; studList += ‘<option value=””>— Select —</option>’; for(i=0;i<countStud;i++)

Javascript | Unable to get content of HTML while converting HTML page to PDF

| By Webner

Problem : Unable to get content of HTML while converting HTML page to PDF. Solution : You can use the javascript if you want to get content of HTML while converting it into PDF : <HTML> <head> <script type=”text/javascript”> function submitForPDF() {

HTML text box should only accept numbers and dot

| By Webner

You can use the following javascript code to check textbox value: <html> <head> <script language=”Javascript”> function isNumberKey(evt) { var re=new RegExp(/^[0-9]*.?[0-9]*$/); if(document.getElementById(“text”).value.match(re)) { alert(“match”); } else { alert(“no match”); return false; } } </script> </head> <body> <input id=”text” type=”text” value=”0″