Topic: iframe (and I use the term loosely) in an html4.01 strict doctype? Pages that link to <a href="https://ozoneasylum.com/backlink?for=31534" title="Pages that link to Topic: iframe (and I use the term loosely) in an html4.01 strict doctype?" rel="nofollow" >Topic: iframe (and I use the term loosely) in an html4.01 strict doctype?\

 
Author Thread
Maskkkk
Paranoid (IV) Inmate

From: Johnstown, PA
Insane since: Mar 2002

IP logged posted posted 12-11-2009 15:17 Edit Quote

I have some existing code that I have been tasked with upgrading to a valid doctype of HTML4.01 strict.

code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">



In the code I've come across an <iframe>, and this does not sit well with the w3 validator.

code:
<iframe 
          OnLoad="javascript: LoadAddAttachmentiFrame('Stock-Attachment-135','/cgi-bin/Xebra?UploadAttachment&amp;s=gnfhcjt7&amp;itemIdentifier=Stock-Attachment-135','gnfhcjt7');" 
          src="/xebrajustadiv.htm" 
          frameborder=0 
          id="Stock-Attachment-135-AttachFrame" 
          name="Stock-Attachment-135-AttachFrame" 
          width="525" 
          height="10">
    </iframe>



The w3 validator even seems to claim that <iframe> is not included the html 4.01 strict doctype.

Now I've been to another website where they claim that there is infact another way to embed content within another document. Unfortunately it requires that you use two different methods (one for IE and one for all other browsers); IE uses an ActiveX Object, and the rest of the browsers use an <object> tag. Additionally the site seems to be refering to an xhtml doctype and not the html 4.01 strict doctype that I am referring to myself.

I don't know what the correct way to embed this content into my html 4.01 strict doctype would be, and additionally I'm concerned that the Javascript that is meant to be called in the onload attribute of the <iframe> tag will not work with the methods suggested in the website; using the ActiveX control for IE and <object> tag for all other browsers.

So what would the correct way be to embed content within content in an html 4.01 strict doctype?

(no I didn't pick the doctype, my boss did).



- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011


(Edited by Maskkkk on 12-11-2009 15:18)

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

IP logged posted posted 12-12-2009 11:31 Edit Quote

You don't normally need anything special for cross-browser compatibility to use an object in place of an iframe. It's hard to comment on JavaScript that hasn't been provided ? give a yell if you have a problem.

Alternatives are using Transitional, Frameset, or HTML5.

Maskkkk
Paranoid (IV) Inmate

From: Johnstown, PA
Insane since: Mar 2002

IP logged posted posted 12-14-2009 15:06 Edit Quote

Reisio,

I don't have any new Javascript for working with the <object> tag yet as I haven't written it. The old existing Javascript that is already in place deals with iframes. I didn't think it was possible to modify the contents of the embedded document when it resides inside an <object> tag (which is basically what we are doing).

The reason I was told that the original coders of the page used iframes was that they didn't want to reload the entire page when they were sending files; the page originally contained several iframes inside of each one was textbox with "browse" button for uploading files.

Also I'd use any of those doctypes if my Boss thought that those doctypes were correct, but he's settled on HTML 4.01 strict.



- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

IP logged posted posted 12-14-2009 23:05 Edit Quote

I don't know if you want to try reimplementing in a less antique way... using XHR perhaps.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu