Skip to main content

Sagar Ganatra

Member since Jul 9, 2010

Recent Blog Comments By Sagar Ganatra

  • Setting Prototype Properties Using Inherited Scope Methods In AngularJS

    Posted on Jun 13, 2014 at 3:12 AM

    How about using a service to get and set the model data. The parent controller and all nested controllers would use this service to get and set the data. If you change something in the View, the $watch expression would catch it and set the model properties accordingly. Code: $scope.$watch('viewMod... read more »

  • Most CSS Floats Can Be Replaced With Relative And Absolute Positioning

    Posted on Oct 2, 2013 at 10:47 AM

    Using position 'relative' and 'absolute' is IMO the correct way when working with layouts. In your second example you're absolute positioning the icon or the avatar. Is there any reason for not using relative positioning here? In this case it is relative to the document flow. I find myself using p... read more »

  • My Experience With AngularJS - The Super-heroic JavaScript MVW Framework

    Posted on Jan 7, 2013 at 12:10 PM

    @Jamie, Thanks a ton for posting that link. I was looking into Google Webmasters tools for Ajax crawling. A headless browser like PhantomJS does come very handy to handle crawler request. I was looking into HTMLUnit to generate a snapshot. Thanks again.... read more »

  • My Experience With AngularJS - The Super-heroic JavaScript MVW Framework

    Posted on Jan 4, 2013 at 8:29 AM

    Ben, I've been looking into Backbone as a solution. I wanted to know how AngularJS addresses SEO. In case of Backbone the data returned from a service is compiled against the client side template (using underscore, mustache etc,.) and then rendered into a container. This affects SEO. Does Angular he... read more »

  • Calling CFFile-Upload Twice On The Same File For Security Purposes

    Posted on Jul 17, 2012 at 11:24 AM

    Ben, In CF10, two attributes - accept and strict have been added that will allow you to restrict the type of file being uploaded. You can provide MIME types or file extensions as a value in the 'accept' attribute. If 'strict' is true then the content of the file is also validated. I had posted th... read more »

  • How Client-Side Validation Is Changing The Shape Of Server-Side Validation

    Posted on Dec 29, 2011 at 1:31 PM

    @Gary, The form validation part on the client side can be taken care by the browser itself. It can validate the field based on the input type. But, if one has to customize the error message then some additional JS code would be required. And yes, as I mentioned earlier, this feature is not availabl... read more »

  • How Client-Side Validation Is Changing The Shape Of Server-Side Validation

    Posted on Dec 29, 2011 at 12:42 PM

    Hi Ben, Good stuff. Of late, I've been looking into features introduced in HTML5. Sometime back I had posted on form validation in HTML5 - http://www.sagarganatra.com/2011/07/custom-validation-messages-for-html5.html. The idea is to let the browser validate the form fields. Though this is not ... read more »

  • Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion

    Posted on Jul 9, 2010 at 1:43 PM

    Ben, Yes, I do use ColdFusion as my primary language for development. CFPOP and CFIMAP can be used to retrieve the message from my gmail inbox, however the client (browser) should be notified (using pusher) of the new message in inbox and then I could use my jQuery to invoke the cfc which in turn ... read more »

  • Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion

    Posted on Jul 9, 2010 at 2:52 AM

    Ben, I did try pusherapp to send messages and it works perfectly fine. A problem what I'm trying to solve is to get notified whenever I receive an e-mail. Say I receive an email in my gmail inbox and I want pusher to send me a notification for this. Are you aware of any gmail apis that I could use.... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel