I’ve been working with modal boxes using Twitter Bootstrap. And the page I’m working on needs to be viewed in mobile devices. The modal looks nice and centered when viewed on desktop, but when run in mobile web browsers, it’s aligned to the top. Someone on StackOverflow suggested the use of a helper div plus […]
JavaScript
JavaScript: Get current function name
getCallingFunctionName() is the important function here.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function getCallingFunctionName() { var re = /function (.*?)\(/ var s = getFunctionName.caller.toString(); var m = re.exec( s ) return m[1]; } function myCurrentFunction(){ var func_name = getCallingFunctionName(); alert(func_name); //displays "myCurrentFunction" } myCurrentFunction(); |
Source: Can I get the name of the currently running function in JavaScript?
Google Maps get coordinates on click or drag and drop
With this tutorial you’ll see how we can place a Google map with search box on your web page, and then get coordinates (i.e. latitude and longitude) based on where you click or where you drag and drop the marker into. The JavaScript API of Google Maps will help us achieve this. This kind of […]
JavaScript: Setting the selected dropdown option by its index number
Long time no new entry. 🙂 Internship is keeping me very busy. In this blog entry I’ll show you how to select a drop down option by specifying its index number.
Fix PNG images with transparency in older Windows Internet Explorer versions
I wonder if this post would still get hits from search engine result pages. So many other web pages feature this fix for IE 5.5 and IE 6 web browser, that the Catzie.net Blog’s entry might just show up on the… 10th page or so. lol. Anyways, I’m still posting this, in case there are […]
Inline Frame that automatically adjusts its height for the source page
Last year, I was working on our MULPROJ layout, and the type of layout I was making needed an iframe whose height is auto resized according to the source page’s content. This means that there should be no vertical scrollbar in the iframe, it simply adjusts itself vertically. I thought that it wasn’t possible to […]