jQuery Dialog error in IE7. Runtime error: invalid argument

So if you’re using jQuery UI dialogs, you may run into issues with IE 7. Apparently the value of a usually ‘undefined’ javascript variable can get set to ‘NaNpx’ in IE7. I had to change the jQuery base code to get a dialog ui component to work.

I was getting the following runtime error: “Line: 1102 Error: invalid argument.”

This error comes from code around line 1101 in jquery-1-2-6.js.

So I think my version of jQuery had already been modified or comes from an older or different source. My code follows, but the most recent 1-2-6 jQuery script has code that is like the comment Dom left (thanks – that code looks more like the most recent release of jQuery).

* WAS THIS, but IE7 was throwing an error
if ( value != undefined )
elem[ name ] = value;
if ( value != 'NaNpx' && value != undefined)
elem[ name ] = value; //NATE - Sometimes the value would come up as NaNpx in
IE and causes an error

jquery runtime error for dialog

Firefox Plugins (Adblock Plus) cause images not to load

So I had an image that was not loading, and could not figure out why, in Firefox 3. Turns out it was a plugin, mos tlikely adBlock plus. When all plugins were disabled, the image loaded fine. Here were the URLs which the plugins blocked, and the one it let by.  Looks like the plugin blocks certain URLs based on specific words.

Always worked:

<img src="http://mydomain.com/comm/cmainpromo.jpg" alt="test">

Only worked with plugins disabled:

<img src="http://mydomain.com/comm/ads/siteads/cmainpromo.jpg" alt="test">
<img src="http://mydomain.com/comm/ads/cmainpromo.jpg" alt="test">

CFML is NOT the Cambodian Midget Fighting League

I’ve noticed a lot of confusion about the acronym CFML (Coldfusion Markup Language) in connection with the other well-known acronym CMFL (Cambodian Midget Fighting League). The CMFL had an incident where an African lion defeated, and killed many of 42 midget fighters in a government sanctioned fight, which resulted in an increased status in the already popular league. Consequently, many coldfusion developers should be aware to use the proper tags and extensions that use CFM and not CMF, as such similar and popular acronyms are bound to clash often. I have already come across such errors often in my limited dev experience.

Summary: CF developers, don’t let the CMFL take precedence in your mind over CFML.


With Internet Explorer, Javascript setAttribute(‘style’, ‘something’) doesn’t work in IE

If you try and set the style attribute of a DOM element with Javascript, the following code WON’T WORK IN IE:

yourelement.setAttribute('style','left:150px; top:150px;');

Instead use:

yourelement.style.cssText = 'left:150px; top:150px;';

Thanks to Rob on this page



Documents in this folder are not available – folder name causes error with webDAV access

This may be one of those things where I am the real cause of this error is totally unrealted to how I perceive the problem, but right now it seems like the folder name ‘bin’ causes problems with webDAV folders.

With a virtual folder on an IIS server that uses webdav, if you create a folder called ‘bin’ you get the following error when trying to access the folder or modify.

'Documents in this folder are not available. The folder may have been moved or deleted, or network problems may be preventing a connection to the server. There is a problem with the webserver. Please try again later or contact the server administrator.'

Many other folder names worked fine. May be related to the following issue:


Throw errors in a cfscript and try catch in cfscript

You CAN’T throw an error or errors from a cfscript without defining your own throw function. But this is pretty easy to do. Somewhere else in your code, just write a <cfunction name=”throw” etc. and in this function just put a <cfthrow tag that throws the error you want to be thrown. A good practice would be to include a throw function in a utility cfc that you could invoke wherever you needed to throw an error in a cfscript.

See the example code below. Note the interesting syntax for catching in a cfscript where you do catch(ERRORTYPE CFCATCHVARIABLE). So catch(database e), catch(any e) would be some common ones. And then you could access e.Message, e.Detail, etc.

//nothing below the throw would execute in this example.
//But I left the rest for syntax reference.
throw("ExampleErrorType","Example Error message.");
//save the reactor record without interfering with custom transaction
catch (database err)
//if the save fails and the error is a database error, return the error detail.
//otherwise this error will need to be caught by the code calling this code.
return err.Detail;

If you want to do a rethrow, the following article has a great example.