Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    Member #
    10907
    I am trying to use anchors to travelo from part of my page to another but it refuses to work. This is the code I am using but it won't work.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <body>
    <a href="#blank">blank</a>
    <h2><a id="blank" name="blank">blank</a></h2>
    </body>
    </html>
    All it does is say the page can not be displayed. Is it because I am using XHTML? My pages also won't allow me to use the percentage resize feature.
    Example:
    <iframe src="aegis.xhtml" height="588" width="1008" name="mass" id="mass" scrolling="yes" frameborder="0" hspace="0" vspace="0"></iframe>
    this works fine but if I type:
    <iframe src="aegis.xhtml" height="100%" width="100%" name="mass" id="mass" scrolling="yes" frameborder="0" hspace="0" vspace="0"></iframe>
    it just displays well, nothing at all. Its like the frame isn't even there. I dont understand it. Any help you could provide would be most useful.

  2.  

  3. #2
    Senior Member zionlocke's Avatar
    Join Date
    Jan 2003
    Location
    .: l33t Basement :.
    Posts
    736
    Member #
    483
    Liked
    3 times
    I've never seen the extension .xhtml used before. Use the .html extension instead. The other problem is the links with the iframe. You should laabel the iframe with a name and have the link target the specific ifram you want the page to be displayed in. I hope this helps.
    Cheers, zionlocke :chinese:
    Links: Zion Creation | Blog

  4. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    Member #
    10907
    um no.

    No what I mean is the anchors won't work even if I am not working in a iframe. The problem with the Iframe is that it won't resize with percents. I have to use pixel sizes like width="200" instead of width="100%" It won't acknowledge percents as "good" sizes. XHTML is a new form of html. go to http://www.w3schools.com to see what it is.

  5. #4
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Location
    Richmond, Virginia
    Posts
    543
    Member #
    2748
    He knows what XHTML is, but the filename still uses the .html extension regardless. You could always use JS to resize the iframe, but it's not very elegant.

  6. #5
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    Member #
    10907
    wait. But I can use xhtml extension can't I? I have been and it works.

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    .xhtml may work locally, but on a remote server, the browser will receive a different `MIME type'. The MIME type tells it how to process the information. Generally, something without a .html extension won't give the text/html MIME type, it will instead give something like text/plain or application/octet-stream, which will cause the browser to ask the user to save or open using an external program.

    Concerning your problem, it will most likely be related to that, actually. Probably your browser is attempting to parse some parts of the thing as XML and getting messed up. Try renaming it as .html and see if that fixes it. If not, then we know the problem lies elsewhere.

  8. #7
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    Member #
    10907
    Yeah but doesn't that mean that now my documents are HTML docs or are they still XHTML documents? WHat makes them XHTML documents and HTML DOcuments? IS that what DOCTYPE does?

    Oh and yes if I change them to .html then the problems are fixed sort of. Now the width atribut of the iframe works if you set it to a percent but the height doesn't!

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    The DOCTYPE and the way you write your code is what differentiates HTML from XHTML. The file extension is a (bad) way that MS came up with to differentiate file types. I say it's a bad way because it's used exclusively, whereas just about all filetypes provide a way to determine what kind of file they are in the first few bytes of the file. It also gives this inaccurate impression that two things that are somewhat different would need different extensions, which is false. But I digress.

  10. #9
    Junior Member
    Join Date
    Aug 2005
    Posts
    6
    Member #
    10907
    For clarification
    "Oh and yes if I change them to .html then the problems are fixed sort of. Now the width atribut of the iframe works if you set it to a percent but the height doesn't!" - from above post.

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    That's odd... Any chance you could show us the full page you're trying to work with?


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:26 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com