Nov 22, 2009
Pages: 1, 2

Mixing XHTML 1.1 And iFrame - Or how to get around using iframes for a nifty AJAX trick

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Designing > Web Design and HTML

Mixing XHTML 1.1 And iFrame - Or how to get around using iframes for a nifty AJAX trick

vizskywalker
Okay, first of all, I let me explain what I want to know.
XHTML 1.1 does not include the IFrame Module, which means putting an iframe into an XHTML 1.1 page will cause errors in validation. Now, I know from the Modularization of XHTML Specification that it is possible to create a DTD that contains all of the modules of XHTML 1.1 as well as the IFrame module. However, after reading through said specification, I am unsure of exactly how to go about a) writing a DTD like that and cool.gif using a DTD like that. So I need to know how to make and use DTDs that include various modules from the Modularization of XHTML Specification.

Now, the reason I want to use iframes is because of a little AJAX trick. Firefox and various other browsers register changes in iframes with the history, so you can navigate through the changes in the iframes with the back and forward buttons. This means that using some javascript and a series of iframes, it is possible to register different pieces of information retrieved with AJAX with the browser's history. Google Maps uses this trick.

It would be great if I could use objects instead of iframes to do the same trick, but there are two problems.
1) objects are completely broken in IE
2) Changing the data of an object doesn't cause it to automatically reload in Firefox.

I can deal with my site being broken in IE, if need be. But in order to use objects, I need to know how to cause Firefox to reevaluate the data. So that would also be a good answer to the question posed in this post. I have seen one method of reloading objects that clones objects with new data and replaces, but that doesn't work. In order to register with the history, I believe it must be the same object. But since I can't get Firefox to reload, I don't even know if that will register with the history.

So once again, what I'd really like to know is, how can I use Modularization of XHTML to mix the IFrame Module and the other modules in XHTML 1.1?

~Viz

 

 

 


Comment/Reply (w/o sign-up)

toby
The closest real option is Xhtml 1.0 Frameset.

Otherwise it'd be a case of combining ^^ and Xhtml 1.1.

Comment/Reply (w/o sign-up)

mastercomputers
Creating your own DTD is not hard at all, it'll take a while to understand it but within a few days you should grasp how to go about this, here's a brief tutorial from w3c to help you http://www.w3.org/MarkUp/Guide/xhtml-m12n-tutorial/

You may want to look into XHTML 1.0 Transitional for the Iframe information you'll require to create a module to add into it.

There is a working draft in W3C to create an alternative iframe means for XHTML called XFRAME but it's not ready yet.

Cheers,

MC

Comment/Reply (w/o sign-up)

saint-michael
Well couldn't you set up a series of php scripts to pull off a iframe? Or set something up with ajax that creates an iframe that validators cannot "Scan"?

But with what mastercomputers said, best to trim down to 1.0 and wait for this Xframe to come out.

Comment/Reply (w/o sign-up)

vizskywalker
QUOTE(saint-michael)
Or set something up with ajax that creates an iframe that validators cannot "Scan"?
The whole purpose in using an iframe is to add functionality to an AJAX application. Using ajax to create something like an iframe prevents any added functionality by limiting all the functionality to things that can be accomplished with AJAX. So, although it could work in creating iframes, it would not be feasible for the needed functionality.

And I think, looking at the XHTML 1.1 DTD, that it might be pretty easy to add to it the IFrame Module (which is already defined by the way). The only problem I can forsee is if the XHTML DOM does not establish rules for iframes, in which case I need to figure out what to add to define rules for where iframes can appear in the DOM.

~Viz

Comment/Reply (w/o sign-up)

vizskywalker
I've been working on a DTD from scratch now, using XHTML 1.1 as my basis, since I eventually want to include everything that is present in XHTML 1.1.

My DTD is here and my Document Model Module is here. My test page is here.

When I attempt to validate, for some reason, the validator keeps failing to identify this as a form of XML. I am not sure why. I was wondering if it is because of something I did, in which case, what? Or if it is because of the validator. Here is a link to the validator page. Any insight here would be helpful.

~Viz

Edit: I figured out part of the problem is that the page should have been served as application/xhtml+xml but was being served as text/html. I have fixed this problem, but it still refuses to validate. After looking into some bug reports on the validator, namely Bug 22 it seems to be a problem with the validator. However, if someone could check anyway and make sure that the problem isn't something stupid I left out, I would appreciate it.

Also, for some reason it seems to be picking up the XMLSchema-instance namespace as well as the XHTML namespace. If anyone can figure out why this is I would appreciate it.

 

 

 


Comment/Reply (w/o sign-up)

Hercco
I've understood that the W3C validator doesn't work with custom DTDs.

But, as your document is XML you can use any XML validator to check if the doc conforms to your DTD. There's plenty of them validators available just search and grab the one you like.

Comment/Reply (w/o sign-up)

vizskywalker
Okay, I found this validator, which seems to accurately describe the problem. (Oh, by the way, I have decided to instead of working from scratch, simply modify the XHTML 1.1 DTD) I keep running into problems in which I can't figure out how the original XHTML 1.1 specification works. Here is the current validation page. The problem lies currently in the IFRAME module, which I did not write myself. I am not really sure what the problem is, but it seems to possibly be having trouble in that it is exclusively using the qname module I wrote and not using mine in addition to the default (I have no idea how the DTD even knows to default to the proper qname module).

The files can all be found here

~Viz

Comment/Reply (w/o sign-up)

vizskywalker
To revive this old post, which I still haven't figured out yet.
The other day I was looking through the modularization and XHTML 1.1 specifications, and I notcied how they added MathML. It seemed to be a very simple DTD which simply included the MathML DTD and XHTML 1.1 DTD. So I tried mimicking it, but substituting the IFrame module for the MathML module. The DTD validated fine, but any pages using it complained that <iframe> was undefined. I noticed, when validating the DTD, that it did not check my custom content-model, so I fiddled with the code until it did. But now when I validate the DTD, it doesn't validate, and the problem seems to be inside the IFrame DTD, which I doubt because the W3C wrote that. Any help would be appreciated.

The Files:
My custom DTD: http://www.mouseisle.com/conformance/xhtml-iframe10.dtd
My custom content-model: http://www.mouseisle.com/conformance/xhtml...ame-1-model.mod
My test page: http://www.mouseisle.com/test2.xhtml
The DTD validator: [url]http://www.validome.org/grammar/validate/?lang=en&viewSourceCode=1&grammarTyp=DTD&url=http:
//www.mouseisle.com/conformance/xhtml-iframe10.dtd[/url]
The W3C validator for the test page: http://validator.w3.org/check?uri=http%3A%...m%2Ftest2.xhtml

~Viz

Comment/Reply (w/o sign-up)

iGuest-Kyarha
Vizskywalker, your pages are no more available :(
Mixing XHTML 1.1 And iFrame

Your work seams to be very interesting, I'm trying to do some iframe work with dtd personalized and xhtml1.1

Could you please let us know how you managed it ?

It would be great for me cause I'm not able to find other examples...

-question by Kyarha

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : mixing, xhtml, 1, 1, iframe, iframes, nifty, ajax, trick

  1. Good Book For Learning Xhtml & Css
    (2)
  2. Xhtml Js Loading.
    (6)
    CODE As Xhtml 1.1, the resize of body, and onload of img are the only errors. How could
    I do this? All I could think was the onload at the end of the page, but as the image is 1.5mb, I
    doubt this will work for most people. Btw, the empty src is correct, if you're intrested its the
    RS world map.....
  3. Xhtml, Javascript, Css And Frames.
    (0)
    Hello, I am building a form where a user selections several options (it uses javascript to modify
    checkbox values based on other selections). At the end I need to re-generate html code based on the
    selected form values, I don't particularly care what way it's done (although my site is
    XHTML 1.0 Transitional), but I need it to update on the fly as they change options. The HTML code
    is Google AdSense code, and I am trying to build my own from to generate all the different ad types
    and generate the code (it's not just for me). What kind of options do I have?....
  4. Help With Java Applet
    With XHTML 1.1/XHTML 1.0 Strict! (8)
    I have a Java Applet for a chat room that is using the tag. It looks like it was from HTML 3.2 but
    I am using XHTML 1.1 (application/xhtml+xml), so I have to use the element. For now I have forced
    that page to load as XHTML 1.0 Transitional in text/html MIME type because I don't know how to
    fix the problem. I have tried many suggestions from many sites but they don't work in Firefox,
    Internet Explorer or Opera (some of them are IE-only but they still don't work in IE). Is there
    any way that the element can be implemented with cross-browser compatibili....
  5. Ajaxload Creates For You Free Custom Animated Ajax "loading" Icons
    (0)
    I've been scanning through a whole lot of blogs these days and quite often I come across really
    interesting tidbits from all around the net.. here's a recent discovery called Ajaxload.info
    . If you're implementing ajax scripts in your site and was to show those funky animated loading
    indicators instead of a vanilla "Please wait... loading" message, then this is the site for you...
    Here's my review from my site: QUOTE(ChaosLab) Nowadays every second site you see employs
    some form or AJAX or the other - either wholly or in parts. With the old-sc....
  6. Cool Ajax! It's So Script.aculo.us!
    (1)
    If you haven't already heard of script.aculo.us, let me introduce you to it now! /wink.gif"
    style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> The user interface of your
    website is a very important tool. This site will give you some pretty cool AJAX code that you can
    integrate into your site. All the sample scripts are very cool and I highly suggest that you take a
    look at these open source AJAX scripts! F....
  7. Help! - Flash & Xhtml Traditional & Strict
    As the title says (7)
    Hey guys, I have not designed a website for over a year. My website is currently in constuction at
    http://geekfromtheforest.com/ Anyways i am able to code in strict and traditonal xhtml 1.0 but do
    not know how to properly code a flash object. So let see if someone can come up with a proper way
    to code a flash object. This is what Macromedia recs but its dirty dirty and pointless and not
    valid! lol CODE                Does anyone have any ideas how to get around
    this? [....
  8. A Hidden Pop-up Box With CSS Only
    A great trick I can't conduct completely (21)
    I am currently developing an online application where people will be able to store their school
    grades along with comments. I wanted to make comments look elegant, so I decided to use a hidden box
    that would appear when hovering over a certain grade. I've found a way to do it without
    JavaScript, and that is by using pure CSS and relative/absolute positioning. But that's not the
    main problem. When I hover over a grade, the normal text is covered by the box (it overlaps the
    text), but the other grades aren't. I suppose that is happening because the grades have....
  9. Drag&drop Js With Ajax
    (3)
    Hello, During last week, I was studying the possibility to implement drag&drop on web pages with
    Javascript and CSS. I don't know if it's help but I recommand you to see the AJAX
    Framework "Prototype". It's a free js library wich can be use in commercial web applications :
    http://prototype.conio.net/ . Several frameworks have enrich the prototype framework : Rico
    (http://openrico.org/), Scriptaculous (http://script.aculo.us/) See you, (Sorry if my english is a
    bit poor, I'm french...)....
  10. What Exactly Is XHTML?
    need help (5)
    i am a regular visitor to http://www.oswd.org , and an enthusiast in learning in css. but i do nto
    know the meaning of XHTML, XHTML Transitional and how to test a site for its design consistency and
    functionability in browsers... i request help in the above topics, thank you.....
  11. Xhtml Is Not Suppose To Be Text/html
    IE not planning to support XHTML yet (8)
    I am quite disappointed in IE's development as with keeping up but still if they feel they need
    to fully work on current things that they have already attempted to resolve and perfect then that is
    a good thing, but development should have never got so messy and only the developer would know that
    it's his fault and not MS's. This isn't to bad mouth IE, but it's so sad to know
    that even after 5 years or more of IE6, IE7 has no intention of supporting XHTML and I don't
    think I can wait for IE8 if development takes such a long time. They should also....
  12. Styling Xhtml
    Making a practical use of XHTML and CSS (0)
    FIRST PART HTML was created with the intention of exposing information , this way under the
    original design approach the content was the most important aspect ; but in a very short time
    things changed drastically , HTML became wildly popular and quickly increased its original purpose,
    so there has been rapid creation of new elements to adapt HTML to the market's more
    sophisticated needs and the surplus of those new elements has led to interoperability problems
    across diverse platforms. To help solve those problems arrived XHTML , which is a much more accessi....
  13. Understanding Xhtml
    A practical introduction to XHTML (8)
    A lot have been said about the convenience of using XHTML instead of the well known HTML for the
    development of web pages and often it is not used since it is believed it’s too complicated to
    learn the new language and that it wouldn’t be worth the time and effort. It seems to me that the
    observation mentioned above is mistaken and I believe that it is worth to try to demonstrate that
    it is all the opposite , but not so much with the theoretical argumentation but rather with a
    practical approach covering diverse aspects of the process of developing web pages. Fir....
  14. Compatibility Issues
    php, xhtml, css and the like... (3)
    I'm a big fan of being absolutely compatible, I still design my sites so you can view them at
    640x480 screen resolution (and get laughed at because of so), and since I've been on the board
    for some time I find that my coding ideals are somewhat outdated. I still have the impression not
    all browsers can read CSS, so I still design my pages with html tables and even though I have an
    external CSS stylesheet, I still use tags like , that basically repeat my CSS, but ensure that
    browsers without CSS can see my website. Problem is, am I doing something really stupid?....
  15. Iframes Are Evil
    (8)
    Iframes are Evil Iframes are used for everything, but I have soooo much trouble with them.They
    never align right or they pop up something they shouldn't. I found frame generator, but even
    then I still got lost because I wanted a layout with them. Is there any really good help sites
    that explain iframes?....
  16. Iframes
    Sick Of hates (37)
    Im so sick of Iframes these people running there mouths about designing with iframes is so terrible
    .... If its functionable and contains what they say it does i could rather careless if the hole
    page is frames =)....
  17. XHTML
    (0)
    XHTML is a combination of HTML and XML (eXtensible Markup Language). XHTML consists of all the
    elements in HTML 4.01 combined with the syntax of XML. Before you continue you should have a basic
    understanding of the following: ~HTML and the basics of building Web pages ~The basics of XML
    -Check out this great site:-- http://www.w3schools.com/xhtml/ ....
  18. Creating Cool Web Sites with HTML, XHTML and CSS
    (0)
    Whether you're building a sophisticated commercial Web site or just creating an online spot to
    call home, good Web site development is about a lot more than just HTML nowadays, and Creating Cool
    Web Sites spends lots of time exploring the nuances of xhtml and Cascading Style Sheets in a way
    you're sure to understand. Incorporating the best of Creating Cool HTML 4.0 Web Pages and
    Dynamic HTML Weekend Crash Course, this book adds tons of critical new and updated information on
    xhtml, CSS, JavaScript, page validation, weblogs and weblog tools, optimal search engine ....
  19. Protect images from Right-click
    No scripts - just a small trick (5)
    Offen happens to see your images used in someone's website. Here is a little trick how protect
    them, from the right-click 'Save Image As..' If you use tables, you can use the
    'real' picture as backgroung in a cell and use a 1x1 tranparent GIF to cover it. See the
    code to understand. CODE ....
  20. iframe question
    (7)
    Ok I'm using an iframe to display my content. I have the height set at 100% but it extends far
    below the height of the screen and creates a scroll bar for the page, something I don't want. Is
    there a bug with iframes and internet explorer or am I just doing something wrong?....
  21. iFrame
    Using a iFrame in your website. (8)
    A iFrame (Inline Frame) allows your visitors to view another page on your site without reloading the
    entire page. Well you can also use normal frames and a frameset to do this, but the advantage of an
    Iframe is that u can place this Iframe at any place in your website. The most important elements
    that can be used in a Iframe: Frameborder With frameborder u can adjust the thickness of the
    border around the frame. Height You can use pixels (example 250) or a percentage (example 55%)
    Name With this element you can give your iFrame a specific name, to refer to ....

    1. Looking for mixing, xhtml, 1, 1, iframe, iframes, nifty, ajax, trick

See Also,

*SIMILAR VIDEOS*
Searching Video's for mixing, xhtml, 1, 1, iframe, iframes, nifty, ajax, trick
advertisement



Mixing XHTML 1.1 And iFrame - Or how to get around using iframes for a nifty AJAX trick

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com