Can't get Function to run from Include file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lasse Reichstein Nielsen

    #16
    Re: Can't get Function to run from Include file

    Thomas 'PointedEars' Lahn <PointedEars@we b.de> writes:
    [color=blue]
    > Lasse Reichstein Nielsen wrote:[/color]
    [color=blue][color=green]
    >> I have yet to see a browser that honors the DOCTYPE declaration to the
    >> point where they refuse features not in the chosen document type. They
    >> might separate between HTML and XHTML, but that is it.[/color][/color]
    [color=blue]
    > Take Mozilla/5.0 and an XHTML DOCTYPE (or one of any other XML
    > application). It does not even matter if XHTML it is served
    > (correctly) as application/xhtml+xml.[/color]

    How about this code then:
    ---
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!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" xml:lang="en" lang="en">
    <head>
    <title>Skeleton </title>
    </head>
    <body>
    <p>a<font color="red">bcd </font>efg<br/>
    <script type="text/javascript">
    document.write( document.compat Mode);
    document.write( " XML-version: " + document.xmlVer sion);

    </script></p>
    </body>
    </html>
    ---
    This is XHTML 1.0 *strict*, so the font tag is not legal. Mozilla
    changes the color to red anyway, i.e., it doesn't ignore the tag even
    though it is not defined in the version of XHTML that the document
    contains. It is in standards mode ("CSS1Compat ").
    [color=blue]
    > You are right for HTML DOCTYPES, though, because both Mozilla/5.0
    > and IE then switch to Quirks Mode.[/color]

    Not necessarily. I always use HTML 4.01 Strict with and URL. It
    triggers standards mode in Mozilla, IE and Opera.

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • Québec

      #17
      Re: Can't get Function to run from Include file

      [color=blue][color=green]
      > > You are right for HTML DOCTYPES, though, because both Mozilla/5.0
      > > and IE then switch to Quirks Mode.[/color]
      >[/color]
      Hi everybody,

      How do you know when IExplorer switch to Quirks
      Mode or stays standards mode?


      Jean Pierre


      Comment

      • Lasse Reichstein Nielsen

        #18
        Re: Can't get Function to run from Include file

        "Québec" <jpda@vidn.ca > writes:
        [color=blue]
        > How do you know when IExplorer switch to Quirks Mode or stays
        > standards mode?[/color]

        This page tells you which DOCTYPEs trigger quirks mode:
        <URL:http://msdn.microsoft. com/library/en-us/dnie60/html/cssenhancements .asp>

        This page tells you how to check when the page has loaded:
        <URL:http://msdn.microsoft. com/workshop/author/dhtml/reference/properties/compatmode.asp>

        I have a bookmarklet that checks it:
        <URL:javascript :alert(document .compatMode);>

        /L
        --
        Lasse Reichstein Nielsen - lrn@hotpop.com
        DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
        'Faith without judgement merely degrades the spirit divine.'

        Comment

        • Jim Ley

          #19
          Re: Can't get Function to run from Include file

          On Mon, 17 Nov 2003 14:04:47 +0100, Lasse Reichstein Nielsen
          <lrn@hotpop.com > wrote:[color=blue][color=green]
          >> Why bother adding to that list?[/color]
          >
          >Some people would claim that XHTML is the future of the web, and people
          >using HTML are holding us back. You are adding to their list.[/color]

          And some people would claim that XHTML is what is actually holding us
          back from the future of the web, XHTML 1.0 being a total failure,
          XHTML 1.1 being better, but no features worth using, and XHTML 2.0
          still tinkering around at edges fixing up a bit, but leaving much
          still broken, and a long way behind other available XML formats.

          XHTML should at most be a clue, and authoring HTML as anything is not
          going to change that.
          [color=blue]
          >All the more reason to not use the language attribute. And it only
          >refer to the Netscape browser. Except for Mozilla, I don't believe
          >other browsers respect the version number, since they only have one
          >Javascript engine available (e.g. JScript through the WSH).[/color]

          IIRC IE can be configured to use different script engines - they'd
          have to be ActiveScripting capable though, so you could make it run
          DScript instead of JScript (or even perlscript if you wanted to be
          particularly perverse.) but I think I agree in principle.

          Jim.
          --
          comp.lang.javas cript FAQ - http://jibbering.com/faq/

          Comment

          • Thomas 'PointedEars' Lahn

            #20
            Re: Can't get Function to run from Include file

            Lasse Reichstein Nielsen wrote:
            [color=blue]
            > Thomas 'PointedEars' Lahn <PointedEars@we b.de> writes:[color=green]
            >> Lasse Reichstein Nielsen wrote:[color=darkred]
            >>> I have yet to see a browser that honors the DOCTYPE declaration to the
            >>> point where they refuse features not in the chosen document type. They
            >>> might separate between HTML and XHTML, but that is it.[/color][/color]
            >[color=green]
            >> Take Mozilla/5.0 and an XHTML DOCTYPE (or one of any other XML
            >> application). It does not even matter if XHTML it is served
            >> (correctly) as application/xhtml+xml.[/color]
            >
            > How about this code then:
            > [...]
            > This is XHTML 1.0 *strict*, so the font tag is not legal. Mozilla
            > changes the color to red anyway, i.e., it doesn't ignore the tag even
            > though it is not defined in the version of XHTML that the document
            > contains. It is in standards mode ("CSS1Compat ").[/color]

            Putting the above code in a document reveals another error:

            | XML Parsing Error: not well-formed
            | Location: file:///[...]/text.xhtml
            | Line Number 4, Column 43:
            |
            | <html xmlns="http://www.w3.org/1999/xhtml"" xml:lang="en" lang="en">
            | ------------------------------------------^

            Having corrected it, I see you are right (the same here, using `Mozilla/5.0
            (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031028') and have found
            nothing but a bug. I cannot use Bugzilla now, please be so kind and file
            the bug if it is not already filed.
            [color=blue][color=green]
            >> You are right for HTML DOCTYPES, though, because both Mozilla/5.0
            >> and IE then switch to Quirks Mode.[/color]
            >
            > Not necessarily. I always use HTML 4.01 Strict with and URL. It
            > triggers standards mode in Mozilla, IE and Opera.[/color]

            You misread my statement. Leaving the DOCTYPE declaration out triggers
            "Quirks Mode" in both of the mentioned UAs. I do not know if Opera has
            a "Quirks Mode" and when it is triggered.


            PointedEars

            Comment

            • Lasse Reichstein Nielsen

              #21
              Re: Can't get Function to run from Include file

              Thomas 'PointedEars' Lahn <PointedEars@we b.de> writes:
              [color=blue]
              > Putting the above code in a document reveals another error:[/color]

              Oops. How did I put that quote there? It wasn't in the file. :)
              [color=blue]
              > Having corrected it, I see you are right (the same here, using `Mozilla/5.0
              > (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031028') and have found
              > nothing but a bug. I cannot use Bugzilla now, please be so kind and file
              > the bug if it is not already filed.[/color]

              I don't know the first thing about bugzilla (I couldn't find it
              without Google), so i think I'll leave that to someone more familiar
              with the process (it requires an account, right?).

              Give me an Opera bug, I'm used to reporting those :)
              [color=blue]
              > You misread my statement. Leaving the DOCTYPE declaration out triggers
              > "Quirks Mode" in both of the mentioned UAs.[/color]

              Ah yes, I read it as including an HTML doctype would trigger Quirks mode.
              [color=blue]
              > I do not know if Opera has a "Quirks Mode" and when it is triggered.[/color]

              It has, and it triggers exactly the same way as IE.
              <URL:http://www.opera.com/docs/specs/doctype/>

              /L
              --
              Lasse Reichstein Nielsen - lrn@hotpop.com
              DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
              'Faith without judgement merely degrades the spirit divine.'

              Comment

              • lakshman99
                New Member
                • Jul 2006
                • 3

                #22
                hi, it is very easy to use asp function
                in java script

                just call like this within javascript....

                <%=yourfunction ()%>

                but, it's not posiable to send value's through javascript to asp function's.

                bye & best of luck

                Comment

                Working...