moving from IFRAME to OBJECT; contentWindow no more!, HTML 4x to XHTML 1.0 migration |
moving from IFRAME to OBJECT; contentWindow no more!, HTML 4x to XHTML 1.0 migration |
liam.liam |
Jul 28 2008, 04:29 PM
Post
#1
|
Group: Members Posts: 3 Joined: 28-July 08 Member No.: 6,288 |
I'm working on a legacy web "application" (it's more a "smart form" than an application) and I have severe time constraints. (That means I can't redesign the whole system at this time.)
I've brought the entire system up to 100% XHTML 1.0 W3C validation except for ONE last thing: the system uses IFRAME elements. The logical thing to do is switch over to OBJECT elements - which I've done but ... OBJECT lacks the contentWindow() method on which this system relies. Any suggestions? Thanks! |
Darin McGrew |
Jul 28 2008, 04:50 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
You could use a Transitional doctype, which allows inline frames.
Just out of curiosity, why are migrating to XHTML 1.0 Strict if you don't have time to "redesign the whole system at this time"? |
liam.liam |
Jul 28 2008, 05:24 PM
Post
#3
|
Group: Members Posts: 3 Joined: 28-July 08 Member No.: 6,288 |
Yeah, I could (would) use Transitional. Unfortunately, these forms are part of our ITS-managed classroom reservation system. The powers-that-be at my university have decided to enforce a full XHTML-compliancy requirement for all web pages that are not directly related to academics. (Yes; in someone's twisted world, classrooms aren't academically related.) Beginning 4-Aug, if a page is nonconforming, it will not be served. Of course, they've given us less than a week's notice and I'm out of town on a business trip. I spent all Sunday night pouring over the markup and pulling it into XHTML 1.0 Strict compliance -- all but the IFRAME spots. I was hoping I had overlooked a 'contentWindow' equivalent for OBJECT elements. Guess not. At this point, my only recourse is to ask (beg) for an exception until the system can be refactored properly.
Thanks for your help! |
pandy |
Jul 28 2008, 05:52 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Yeah? Isn't XHTML Transitional XHTML compliant?
|
liam.liam |
Jul 28 2008, 07:44 PM
Post
#5
|
Group: Members Posts: 3 Joined: 28-July 08 Member No.: 6,288 |
Yup. But they got the "Strict" bug. We're not the only department facing issues. You gotta love those data services people. They forget the rest of us in IT.
|
Christian J |
Jul 29 2008, 04:21 PM
Post
#6
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
"contentWindow" is a javascript property. So since this functionality of the site apparently relies on javascript already, why not create the whole IFRAME with javascript? That way you'll pay lip service to the W3C in the hard-coded XHTML, while maintaining the current functionality (whatever it is). Just make sure the javascript doesn't make the XHTML invalid, e.g. don't use "document.write" to create the IFRAME (use the DOM instead).
As a bonus you don't need to use OBJECT, which might be poorly supported in some ways. Of course http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts recommends not making pages script-dependent in the first place... |
Lo-Fi Version | Time is now: 18th April 2024 - 09:58 PM |