Compsoft Flexible Specialists

Compsoft plc

Compsoft Weblog Compsoft Website News Archive Privacy Policy Contact Us  

Tuesday, May 08, 2007

AJAX and iFrames

I have recently been rejuvenating a site which I wrote a year or so ago using DNN (DotNetNuke and open source CMS system). Part of this rejuvenation involved putting a dropdown extender onto a page which happened to be contained within an iFrame. Nothing to weird about this setup so far and in firefox this all worked very happily however just to make sure I flipped over to IE7 and to my horror my nice dropdown extender stopped working immediately and was replaced with a JavaScript error saying Sys.ArgumentOutOfRangeException: Value must be an integer.

This at first led me to look through all my code to look if I had inadvertently missed some conversion check. once satisfied that I hadn't I made a silly mistake in code I turned my attention to the HTML.

My investigation lead me to find that the problem was the way in which DNN was creating the iFrame and in particular the FrameBorder attribute. This was being set to 'No' or 'Yes' depending on a setting in the module settings however W3C HTML standards say that this setting should be '1' or '0' only.

Just thought this would be worth a post in case any others come across similar errors, I'm guessing the AJAX control somewhere along the line is parsing this value to an int although I have not poked my way through the code yet to find why on earth this would be necessary.

0 Comments:

Post a Comment

<< Home