Blog

Decode HTML code with jQuery

In one of the project, we are storing all form fields in json string format (i.e. {"name":"myname", "email":"may@xyz.com", "address":"myaddressdetail"}) in the database table. To avoid the JSON parsing error due to any special characters while retrieving data from database and deserialize the json string, I convert all special characters in the fields value with their HTML-escaped equivalents (by using coldfusion HTMLEditFormat() function). Till this it's works fine but I found the issue with the HTML-escaped equivalents code when I am going to retrieve data with AJAX and placed value to appropriate input field. At here I want to convert the HTML-escaped equivalents code to appropriate special character (i.e. & needs to be converted into & sign).

 
By Nirav
Comments(0)
Tags: html, javascript, jQuery
ColdFusion Schedule Task Issue with Daily Every task

Schedule task in ColdFusion is something I love most and I guess all ColdFusion developers are too. It is really easy to schedule any page to run for given specific date - time or periodically, even you can easily add it through code by CFSCHEDULE tag. For who are new to admin interface of schedule task it will look like below. In frequency there are three option 1. One-Time 2. Recurring 3. Daily Every, I think option caption itself mention what it will do. One common thing in all three options is you need to provide start time to tell schedule task runner when to start execution.

By Pritesh
Comments(0)
Tags: ColdFusion, schedule task
Scroll issue with iPad browser for framed window

Recently one of our client report scrolling issue when they try to view their website on iPad (or any mobile device). Page they are looking has iframe with scroll so basically two scrolls on browser but when user trying to scroll within iframe anyhow iOS browser doesn't able to recognize it and always scroll main window. I have gone through iPad guide provided Apple which mention that we can scroll within iframe by two fingers and use single finger to main window. I tried but doesn't work for me (may be it support new iPad only) and ask client to do so but it doesn't work for him as well.

By Pritesh
Comments(0)
Tags: iPad, ColdFusion, iFrame
Tag SES URL throw 404 error if tag has special characters other than '-'

Recently working on MuraCMS (opensource Content Management System build on CFML) for our company website. While working on blog section where we used to have tag for each post. For one of post we have tagged which include space and dot, when we click on through tag link SES url it throws 404 error. This only happen if you are using URL rewriting to remove index.cfm from URL. After little bit of debugging I found that it was due to rewrite URL, default rewrite URL script provided by MURA doesn't support redirection of URL having special character other than '-'. This is will work fine for search by page, category etc as MURA itself change it value with SEO friendly but in case of tag it doesn't.

By Pritesh
Comments(0)
Tags: Mura CMS, ColdFusion, Regular Expression
Configure GIT server on windows server 2008

We are using SVN since long time as version control system for our local development and quite happy with it as well until I come across GIT. GIT get lots of popularity in last couple of years but never get chance to look into this Although we were hosted some of our open source project/code on github.com and pretty easy to use and impressed with forking ability. After getting use to with GIT it was time to implementation, we do not want to move our code to github.com or other same kind of website rather create Git server on our local environment only and on windows server.

Comments(2)
Tags: GIT, WIndow, VersionControl
ColdFusion Schedule Task Error: The Cron service is not available.

Recently I face strang error in five years of career in ColdFusion. 
Message: "The Cron service is not available." 
Detail: "This exception is usually caused by service startup failure. Check your server configuration."

 
By Pritesh
Comments(0)
Tags: ColdFusion, schedule task, neo-cron
January 30, 2012
Issue with Amazon S3 PDF download link in Chrome and Internet Explorer (IE)

In one of our project we are using Amazon S3 to store files which later use to download from web application. We have most of the files are in secure list and only accessible through web application. It was working fine for firefox but on chrome and Internet Explorer (specially PDF file) doesn't download or open in PDF Viewer plugin instead shows about:blank page client do not have any idea what going on. For tempory solution client able to download by right click on link and selecting save link to... option but this is not everybody going to do.

Comments(1)
Tags: AWS, ColdFusion
January 24, 2012
Submit form to CFWINDOW

This may be wrost title. Basically I need to submit form and submit page should render in cfwindow object, another issue was there are some javascript code/function on my submit page as well which should be render to.

Normally CFWINDOW will execute script of rendering page and you many not able to call function defined in rendering page. Below code how you can submit form to CFWINDOW with loading script as well.

Comments(3)
Tags: ColdFusion9
January 7, 2012
Case Study: HauntWorld.com AWS implementation

ABOUT HAUNTWORLD

HauntWorld the most advanced haunted and Halloween attraction directory on the web. Hauntworld.com is dedicated to promoting the haunted house industry, which includes haunted houses, attractions, events and vendors who provide products and services. HauntWorld helps to find haunted houses nationwide and additionally offer the national media information about the haunted house industry. Client running around 11 different sites on existing dedicated hosting servers.

EXISTING STRUCTURE

Existing infrastructure contains two application servers and one database server. App Server 1 holding mainly two high traffic websites built on ColdFusion and PHP and App Server 2 holding rest of the low traffic websites. Both application servers connected with database server (MSSQL and MySQL database) through LAN.

Comments(0)
Tags: AWS, Cloud, ColdFusion
December 30, 2011
Passing additional data to CALLBACK function of jQuery.ajax

Now a days we can not imagine web application with AJAX and jQuery make stuff lot easier to us. We normally need to use ajax call to update web content asyncronously. $.ajax is really simple to use, well I haven't write this post to advertise $.ajax but to explain how we can pass our custom arguments to its callback function.

$.ajax callback function have three default parameter 1. Content 2.Status 3. HTTPResponse object and in most of the case this are enough information in case you want to alert user or display message on particular dom object.

Comments(0)
Tags: jQuery