Tuesday, September 04, 2012

Hi,

The cross domain is a well know issue when trying to work between 2 or more domains under the same web page.

For an example, you developed a great third party control (or some other web component) that suppose to affiliate with another web site and hosted it inside an iframe on the host web site, but when giving the ability for the common user to do some actions inside your cross domain iframe, you find yourself in a problem because the host web site bans all the requests from the iframe itself.

 

This is a very common cross domain problem, that is being exists in some browsers in order to perform security policy.

 

I found lately a great open source code that can solve your problems very easily called: easyXDM.

According to their site: “easyXDM is a Javascript library that enables you as a developer to easily work around the limitation set in place by the Same Origin Policy, in turn making it easy to communicate and expose javascript API’s across domain boundaries.”

You can find some code examples and how-to techniques on their web site here.

 

Have fun and good luck!

AJAX | JSON | Javascript
Posted by: Eran Nachum (c)
Post Date: 9/4/2012 11:27:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Tuesday, December 06, 2011

I am getting into HTML 5 lately and a result of some investigations and querying the web in order to find great helpers, tools and open source frameworks, I bumped into the Modernizr.

This is a great open-source JavaScript library that helps you build the next generation of HTML5 and CSS3-powered websites.

The Modernizr (in simple words), helps you to find out which elements or features are being supported by each major browser.

Some of the features and behavior according the official website:

Modernizr aims to bring an end to the UA sniffing practice. Using feature detection is a more reliable mechanic to establish what you can and cannot do in the current browser, and Modernizr makes it convenient for you in a variety of ways:

  1. It tests for over 40 next-generation features, all in a matter of milliseconds
  2. It creates a JavaScript object (named Modernizr) that contains the results of these tests as boolean properties
  3. It adds classes to the html element that explain precisely what features are and are not natively supported
  4. It provides a script loader so you can pull in polyfills to backfill functionality in old browsers.

 

Posted by: Eran Nachum (c)
Post Date: 12/6/2011 10:10:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Sunday, November 27, 2011

Did you ever get from your graphic designer a request to build a website of a web application according to his/her design including the strange (but nice and designed) font called “Myriad Pro” or some else non supported fonts by the common browser?!?

The common answer that I've responded always is: “Let go for Arial or Verdana – it’s supported by all browsers!!, or if you want let’s put an image text with your design – but remember it will affect SEO badly…!”

It seems that there is a beautiful solution for this “problem” which let you the ability to render every kind of font in the world in your website in order to get special, clean and “other” font layout.

The free online solution for this scenario is typeface.js. This solution let you upload your font declaration file into their website and the output will be a JavaScript file that hold all declarations of how to render the special non supported fonts.

Instead of creating images or using flash just to show your site's graphic text in the font you want, you can use this solution and write in plain HTML and CSS.

I recommend to give it a try – I did!

http://typeface.neocracy.org/

Posted by: Eran Nachum (c)
Post Date: 11/27/2011 6:33:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #

Is it seems to be that Microsoft is going to let developers use an open source in order to build Windows 8 applications?

I read a post on TNW that says Microsoft is going to do so – this approach will be called “New Windows” and will let an easy way to develop mobile and desktop apps using traditional JavaScript and HTML 5 for the UI layer.

It is important to say that Silverlight wasn’t mentioned in the Microsoft enouncement…!!!

I think that these are great news, which will open doors not only developers of all kinds (not only .Net developers and MS dedicated technologies developers), but to all “kinds” of developers.

Posted by: Eran Nachum (c)
Post Date: 11/27/2011 6:13:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Tuesday, May 31, 2011

Common Problem:

Popups are being blocked on browsers when the window is opened asynchronously. For example, needing to do some action on server before opening the window popup.

Since the window is not opened right after the user initiative, the window is being blocked.

The Solution:

  1. Opening the window with empty URL and give the window a name. window.open("", name, WindowProperties);
  2. Asynchronously do the round trip to the server and request for data calculation or some server actions.
  3. When returning to client, refreshing the opened window by calling window.open again with the relevant URL and the same window name. window.open(url, name, WindowProperties);
Posted by: Eran Nachum (c)
Post Date: 5/31/2011 4:05:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #