Tuesday, August 28, 2007

Printing an iFrame

Recently I had a user request to print out the main display window in our content management system from the left navigation window. I remembered doing this years ago but could not get the script right from memory so I hit the web. This was a common problem yet most of the suggestions did not work for me or countless others. Eventually I remembered something about needing to access the top level window in the window hierarchy when making a call from one frame to another and produced the following script that worked like a charm:

window.top.frames[1].focus();
window.top.frames[1].print();

You need to bring focus to the frame/iframe you want to print before calling the print method otherwise the frame that has focus will print out instead.

Friday, August 24, 2007

3.0

No not Web 3.0 bub, it's season 3 of the A-League mon ami. The start of a new season is a time of hope for all football fans, the hope that your team might be the last one standing by seasons end (Sydney FC in my case). A new season is a clean slate where past disappointments are buried into the bitter cold black earth like contaminated waste

Season 3 promises to be the best season yet. Every team in the league has beefed up their squads substantially and there's a distinct Brazillian influence on the league this season so the highlight reel should be jam packed with stunning goals.

Trying to pick a winner based off team rosters is incredibly difficult as many sports writers have pointed out, but like them I'm going to put down my predictions for season three. Here is the table as I see it standing at seasons end:

1. Adelaide United
2. Sydney FC
3. Melbourne Victory
4. Newcalstle Jets
5. Central Coast Mariners
6. Brisbane Roar
7. Wellington Phoenix
8. Perth Glory

I think Adelaide will be the team to beat, I was impressed by their pre-season cup performance and they have individual players who will create headaches for many defenders and goalkeepers.

Tonight kicks off season three with Sydney up against central coast and I'm buzzing with anticipation.

Lets see what $1,000,000 buys Sydney.

My prediction for tonights match is a Sydney win with a scoreline of 3-1. I'm hoping for some Brazillion magic along with a Brosque special.

Tuesday, August 7, 2007

Error getting state of database

Rarely am I moved to make a tech contribution after solving a tricky technical problem, mostly because the solution is already out there you just need to let your fingers do the walking via Google. But recently I came across a problem whose solution had a very faint Internet footprint so I decided to add another record for the search engines to index to hopefully help out a developer who might also be flummoxed by the same MCMS2002 SP2 hotfix problem.

After applying the post SP2 MCMS2002 hot fix the "Database Configuration Application" produced the following error. "Unable to query the condition of the selected database. The selected database may be corrupt. Please select either an existing MCMS database or an empty database. Automation error -2147221101"
The solution to this problem was to overwrite the local "_dca.ini" (found in "C:\Program Files\Microsoft Content Management Server\Server\Setup Files\SQL Install") file with the copy on the server containing the MCMS Database and MCMS installation.
This article (http://support.microsoft.com/?kbid=913401) basically contains the solution I used but it describes the solution for a different error message.