I was playing bootstrap modal window. I have created a html file. Downloaded and linked bootstrap resources (both js and CSS). Copy pasted the html snippet from bootstrap website. But when clicking on the button to show modal window, modal window appearing for a fraction of sec and disappearing immediately . After googling and checking my code found the problem. I have included bootstrap.js at 2 places. One in head and another in footer by mistake. As per net, it seems same issue can occur if you include individual js file (bootstrap.modal.js) and bootstrap.js. So check your code and remove duplicates. That will solve the issue.
Fix : Bootstrap Modal window disappearing immediately
Posted by Ganesh on May 14, 2013
http://ganeshgembali.wordpress.com/2013/05/14/fix-bootstrap-modal-window-disappearing-immediately/
A useful and wonderful way to share code : gist
When I started writing blogs to share small code snippets I used to fight a lot to align them and style them. This was one of the friction point to share code snippets and there is no fun in technical blog without snippets
. Then since last few months I was seeing lot of blogs with gists. This is a very easy, effective and beautiful way to share and manage code snippets with community.
Read the full post »
Posted by Ganesh on May 7, 2013
http://ganeshgembali.wordpress.com/2013/05/07/a-useful-and-wonderful-way-to-share-code-gist/
Tip : Problem with single and double quotes in JSON
Sometimes if your javascipt code is not working and if you are using JSON in there, may be you want to check use double and single quotes in json string.
For example check following code :
$.ajax({
url:'-----',
data:"{'username': 'Ganesh','text': 'This is test'}",
})
This code may not work because you have single quotes inside and double outside
. I know this is totally something you might unexpect, but you can expect unexpected from javascript ![]()
Following will work.
$.ajax({
url:'-----',
data:'{"username": "Ganesh","text": "This is test"}'
})
Best option would be create a JSON object separately and use JSON.stringify
var obj = {'username': 'Ganesh','text': 'This is test'};
$.ajax({
url:'-----',
data:JSON.stringify(obj)
})
Happy javascripting
Posted by Ganesh on March 29, 2013
http://ganeshgembali.wordpress.com/2013/03/29/tip-problem-with-single-and-double-quotes-in-json/
modern.ie : Microsoft frontend testing tool
Seems microsoft finally trying to please frontend developers. They have released a free/paid online tool which analyses web page and provides a report with problems and suggestions to make the page look fine on all IE browsers as well as others. It has more features than just this. Explore it here : modern.ie
Posted by Ganesh on February 22, 2013
http://ganeshgembali.wordpress.com/2013/02/22/modern-ie-microsoft-frontend-testing-tool/
Why you might want to learn AngularJS
Job interviews are not always an one side communication, sometimes you can get some knowledge from interviewer. Last week one of the interviewer told me about AngularJS while we are talking about latest JS frameworks. That is when I started checking about it. I spent an hour on it and I already become a fan of it
. The whole structure and syntax is so nice to accommodate the latest developments with enterprise level web projects.
Previously developers especially Java developers used to run away from Javascript and tried to keep it to minimal even in web projects. With latest developments and trends javascript become main stream framework where you can write almost everything in it. AngularJS has clear separation of markup from javascript by making use of extra attributes in the tags rather than javascript producing markup. This is what attracted me towards using it in my next enterprise project
- Developers and UI designers can work independently in parallel with out crossing each other
- Change in markup or javascript is easy as both of them are linked via attributes. Infact this concept looks like Wicket framework in Java.
- Final but important code will look cleaner.
Please note that this is my first 1 hour impression of AngularJS and I feel major advantage because of its structure. Happy Javascripting
.
Posted by Ganesh on November 19, 2012
http://ganeshgembali.wordpress.com/2012/11/19/why-you-might-want-to-learn-angularjs/
Missing wiki markup in (Atlassian) wiki? – An alternative for you
I manage a confluence instance for my client. When we have decided to upgrade confluence from 3.5 to 4, one of the big pain point was “No wiki markup”. Everyone was surprised – ” Wiki without wiki”. Well Atlassian have a bunch of reasons and gave another most powerful editor. But lot of wiki lovers felt so bad and they were missing it badly after all they are lovers
.
After checking different alternatives for all those missing wiki markup, I found following approach simple, cheaper and most effective of all. The latest editor in confluence always makes sure that html created behind is strict html. So I have used the tool “wikifier” to convert confluence html to wiki.
- Copy html text directly from page to wikifier
- Wikify it
- Edit and insert new wiki markup using “Insert -> Wiki markup” in the new confluence editor.
All tools we are using are free. Also it cleaner. May be soon we can see a plugin for confluence based on wikifier.
Posted by Ganesh on October 25, 2012
http://ganeshgembali.wordpress.com/2012/10/25/missing-wiki-markup-in-atlassian-wiki-an-alternative-for-you/
Story of my app : Chose the datastore for graph data
Posted by Ganesh on June 26, 2012
http://ganeshgembali.wordpress.com/2012/06/26/story-of-my-app-chose-the-datastore-for-graph-data-2/
Story of my app : Chose the datastore for graph data
Just like any day dreaming entrepreneur in this mobile apps world, I also got an idea to develop a mobile application. Bascially I want to build route suggestion application. So I started my research to find best way to implement this idea. I wanted to write notes about all my findings and my work through out, starting from idea development till getting it live. And also I feel its better to get suggestions from people about my approach at every step so that I can “Fail Early” rather than waiting till the end. I will be publishing my notes regularly including different technical and non-technical aspects of developing this mobile app. In this blog I am putting my thoughts regarding chosing the datastore for this app.
Posted by Ganesh on June 26, 2012
http://ganeshgembali.wordpress.com/2012/06/26/story-of-my-app-chose-the-datastore-for-graph-data/
Why were/are you not writing blogs : Me-Present Vs Me-Past
Its been long time since I wrote any blog. Not that I have been writing one a day previosly. But I am slowly realising that putting thoughts (digital) on paper is more relaxing than piling them inside my mind where they get rotten and finally thrown away.Yesterday when I was looking at the drafts in my wordpress acocunt, I saw a draft explaining my idea about js templating engine similar to velocity in java which was 3 yrs old. Now there are so many such frameworks available and being used so extensively. This made me feel bad. Then opened my beer and lied on my bed to start a time travel in past to see “Why I haven’t published it?”. This is the conversiation between Me-Present and Me-Past (one inside my mind giving reasons).
Read the full post »
Posted by Ganesh on June 21, 2012
http://ganeshgembali.wordpress.com/2012/06/21/why-wereare-you-not-writing-blogs-me-present-vs-me-past/
EL expressions not getting evaluated in JSP pages
EL expressions are quite useful keep your jsps more readable and maintainable. Yesterday I faced a problem with new project. EL expressions in my jsp are not getting evaluated although I have set the attribute in request.
In servlet :
request.setAttribute(message,”Hello World!”);
In JSP :
${message}
On HTML it is being rendered as : ${HTML}
If you are also facing the same problem use following page directive at top of the page :
That will solve the problem.
Posted by Ganesh on September 20, 2011
http://ganeshgembali.wordpress.com/2011/09/20/el-expressions-not-getting-evaluated-in-jsp-pages/
