I've been having trouble getting Shadowbox to "see" my changes to the ext array. In this case, I want to display .java class files as plain text (which they are). In my <head> code, I defined the following:
var sbMimeMap = {
img: ['png', 'jpg', 'jpeg', 'gif', 'bmp'],
swf: ['swf'],
flv: ['flv'],
qt: ['dv', 'mov', 'moov', 'movie', 'mp4'],
wmp: ['asf', 'wm', 'wmv'],
qtwmp: ['avi', 'mpg', 'mpeg'],
iframe: ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php',
'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml',
'txt', 'vbs', 'java']
};
And then passed it to .init along with other options:
window.onload = Shadowbox.init( {
initialHeight:350
, initialWidth:450
, loadingImage:"loading.gif"
, handleException: "Shadowbox error"
, handleUnsupported: 'link'
, ext: sbMimeMap
} );
I tried passing the "mime map" both as a variable, and as an inline array, but with the same result: When I try to pass Shadowbox a .java file, it opens the Shadowbox window but doesn't load the file - and the browser then pops up a load/save dialog over the Shadowbox window, as if Shadowbox has rejected the file and passed it to the browser.
I think this problem occurs only when I invoke Shadowbox via the open() function in Javascript, not when I call it via an
tag. Any suggestions? Many thanks for any help you can offer!!!