codewala

code it

XML to JSON converter

I had few xml files which I needed to be converted into JSON format, while searching on the web if there is already a tool available which does this, i ended up finding some good ones.

online XML to JSON converter
http://www.thomasfrank.se/xml_to_json.html

jQuery plugin to convert a XML to JSON
http://www.fyneworks.com/jquery/xml-to-json/#tab-Overview

JSON validator + formatter
http://www.freeformatter.com/json-formatter.html#validateButton

Advertisements

November 18, 2011 Posted by | HTML, JavaScript, jQuery, JSON | Leave a comment

PhoneGap

PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. PhoneGap leverages web technologies developers already know best… HTML and JavaScript. Learn More

August 2, 2011 Posted by | CSS3, HTML, JavaScript, Mobile | Leave a comment

Detecting Devices Using JavaScript

var deviceIphone = “iphone”;
var deviceIpod = “ipod”;

//Initialize our user agent string to lower case.
var uagent = navigator.userAgent.toLowerCase();

//**************************
// Detects if the current device is an iPhone.
function DetectIphone()
{
if (uagent.search(deviceIphone) > -1)
return true;
else
return false;
}

//**************************
// Detects if the current device is an iPod Touch.
function DetectIpod()
{
if (uagent.search(deviceIpod) > -1)
return true;
else
return false;
}

//**************************
// Detects if the current device is an iPhone or iPod Touch.
function DetectIphoneOrIpod()
{
if (DetectIphone())
return true;
else if (DetectIpod())
return true;
else
return false;
}

June 24, 2011 Posted by | HTML, JavaScript, Mobile | Leave a comment

Google Web Toolkit (GWT)

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It’s open source, completely free, and used by thousands of developers around the world.

click here to read….

June 12, 2011 Posted by | HTML, JavaScript | Leave a comment

Restrict resizing of HTML popup window after a certain limit in IE

1. The resizing works only for the popup window.

2. Javascript timer is set which calls a function to after every few seconds to check what is the current size of the html window – if the html window size is less than the required minimum limit – then resize the html popup window using the javascript method resizeTo(width, height)

launch.html
—————————–

Pop-up Window

resize_window.html
————————————-

var t;
var timer_is_on=0;

function timedCount()
{
t=setTimeout("timedCount()",100);
var w = document.body.clientWidth
var h = document.body.clientHeight
if(w < 500)
{
window.resizeTo(550,550);
}
}

function doTimer()
{
if (!timer_is_on)
{
timer_is_on=1;
timedCount();
}
}

May 14, 2011 Posted by | HTML, JavaScript | Leave a comment