Thursday, October 29, 2009

Ajax popups on Firefox

I was working on fixing an Ajax popup that wasn't displaying on Firefox. Saw that the script was erroring-out on this line:
event.cancelBubble = true;
Found the solution near the bottom of this thread.

So now the popup appears, but it shows blank on Firefox (fine on IE). The problem had to do with setting .innerText. Need to use .innerHTML or .textContent for Firefox. Got that from this thread.

Thursday, October 15, 2009

Javascript Minifier

An online minifier using JSMin.
I used this one before, but the link seems to be dead. Can always google for "online jsmin".

[edited 21may2010]-Hmm that minifier doesn't work anymore either. Am now using http://jscompress.com.

Wednesday, October 14, 2009

VS Debugger: No Source Code Available for the Current Location

When the Visual Studio debugger can't find the source for your code, it will prompt for a location. If you make the mistake of hitting "cancel" on that dialog, it will mark it down on the solution properties under "do not look for these source files". If it's not removed from that list, then the debugger will display the "No Source Code Available for the Current Location" dialog box while you pull your hair out.

This helped: MSDN article about the dialog box. (Found this reference through this forum.)

Look at the solution properties. Under "Common Properties," go to "Debug Source Files". Look in the "Do not look for these source files" box and remove the source file that it's having issues with. While you're at it, add directories as needed in the "Directories containing source code" box.

(this refers to VS2008)

Tuesday, October 13, 2009

Ordering stylesheets and scripts

See the Google Code article about Properly Including Stylesheets and Scripts.

If it looks like your external stylesheets aren't being recognized, try moving them before the script files.