Saturday, February 18, 2012

Open Blu-ray discs with VLC 2.0

The Open BDMV folder doesn't work for me.  The only way I could get a Blu-ray to open is via Open Network and using an MRL like "bluray:///Volumes/Greece 2008".  The Open BDMV folder UI adds the BDMV subdirectory to the MRL which seems to cause the playback failure.

Thursday, February 09, 2012

innerHTML and IE

I needed to insert a large chunk of html returned from an Ajax call to a pre-existing CGI script.  Everything seemed to work fine under Chrome, but under IE I was getting an Unknown Runtime Error.  I was able to get things to work by using a regex to grab only the table element that I was interested in and inserting that to my document via my div's innerHTML.  This seemed somewhat fragile.  I found a better solution in the comments to this blog post.

This is what I ended up doing (where data contains the html returned by the Ajax call and flowDiv is the id of the div I am inserting into):
  
var oldDiv = doc.getElementById('flowDiv'); 
var newDiv = doc.createElement(oldDiv.tagName); 
newDiv.id = oldDiv.id; 
newDiv.className = oldDiv.className; 
newDiv.innerHTML = data; 
oldDiv.parentNode.replaceChild(newDiv,oldDiv);