Java title

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • drum118

    Java title

    What is the current way for stating what a java script TITLE is for
    xhtml strict since I must be over looking it? W3 validation said there
    is no title.

    When I wrote the site 5 years ago to strict xhtml which was validated at
    w3 site it was like this as well for Bobby:
    <a id="back"><!-- Today Date --></a>
    <script type="text/javascript" src="pages/js/today.js" title="Today
    Date">
    </script>
    <br />
    <!-- Date Page was Updated -->
    <script type="text/javascript" src="pages/js/update.js" title="Date the
    page was last updated">
    </script>

    Thanks

  • Steve Pugh

    #2
    Re: Java title

    drum118 <drum118@hotmai l.com> wrote:
    [color=blue]
    >What is the current way for stating what a java script TITLE is for
    >xhtml strict since I must be over looking it?[/color]

    There is no title attribute for script in any version of HTML or
    XHTML. Check the HTML 4.0 spec if you don't believe me.
    [color=blue]
    >W3 validation said there is no title.[/color]

    Correct.
    [color=blue]
    >When I wrote the site 5 years ago to strict xhtml which was validated at
    >w3 site[/color]

    Yesterday you said 3 years ago.. ;-)

    Anyway, no it could not have validated then, this has not changed
    since <script> was first introduced in HTML 4.0, back in 1997.
    [color=blue]
    > it was like this as well for Bobby:[/color]

    Bobby doesn't check the validity of the code and hence is irrelevant.
    [color=blue]
    ><script type="text/javascript" src="pages/js/today.js" title="Today
    >Date">
    ></script>[/color]

    What do you expect a browser to do with that title? If you told us
    that we might be able to tell you the best way to achieve it.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

    Comment

    • drum118

      #3
      Re: Java title

      Steve Pugh wrote:
      [color=blue]
      > drum118 <drum118@hotmai l.com> wrote:
      >[color=green]
      > >What is the current way for stating what a java script TITLE is for
      > >xhtml strict since I must be over looking it?[/color]
      >
      > There is no title attribute for script in any version of HTML or
      > XHTML. Check the HTML 4.0 spec if you don't believe me.
      >[color=green]
      > >W3 validation said there is no title.[/color]
      >
      > Correct.
      >[color=green]
      > >When I wrote the site 5 years ago to strict xhtml which was validated at
      > >w3 site[/color]
      >
      > Yesterday you said 3 years ago.. ;-)
      >
      > Anyway, no it could not have validated then, this has not changed
      > since <script> was first introduced in HTML 4.0, back in 1997.
      >[color=green]
      > > it was like this as well for Bobby:[/color]
      >
      > Bobby doesn't check the validity of the code and hence is irrelevant.
      >[color=green]
      > ><script type="text/javascript" src="pages/js/today.js" title="Today
      > >Date">
      > ></script>[/color]
      >
      > What do you expect a browser to do with that title? If you told us
      > that we might be able to tell you the best way to achieve it.
      >
      > Steve
      >
      > --
      > "My theories appal you, my heresies outrage you,
      > I never answer letters and you don't like my tie." - The Doctor
      >
      > Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>[/color]

      The site was last up dated 3 years ago and the site was built 7 years ago
      with JS been 5 yrs ago.

      First one will tell what the current day is. The 2nd one will tell when the
      page was last sent to the server. This is on every page.

      The person reading the text will understand it.

      Like I said, I have not try my hand at web design for 3 years and just
      getting back into it. I just cannot find what I have to do for Title and that
      is why I am asking the question.

      As for my other question, all </p>, <br />, and so on closing brackets are
      there. Just ran the page again today and only spits out title="Today Date"
      and said nothing about the other JS. So, it have to be the validator that
      miss read it the first time.

      Thanks


      Comment

      • David Dorward

        #4
        Re: Java title

        drum118 wrote:[color=blue]
        > Steve Pugh wrote:[/color]
        [color=blue][color=green]
        >> What do you expect a browser to do with that title? If you told us
        >> that we might be able to tell you the best way to achieve it.[/color][/color]
        [color=blue]
        > Like I said, I have not try my hand at web design for 3 years and just
        > getting back into it. I just cannot find what I have to do for Title and
        > that is why I am asking the question.[/color]

        OK - I'll take a wild leap here. You are using the non-existant title
        attribute for <script> becuase you want to provide advisary information
        about the data output by the script?

        Create a title attribute for the elements the script creates, not for the
        script itself.

        --
        David Dorward <http://dorward.me.uk/>

        Comment

        • Anne van Kesteren

          #5
          Re: Java title

          Steve Pugh wrote:[color=blue][color=green]
          >><script type="text/javascript" src="pages/js/today.js" title="Today
          >>Date">
          >></script>[/color]
          >
          >
          > What do you expect a browser to do with that title? If you told us
          > that we might be able to tell you the best way to achieve it.
          >
          > Steve[/color]

          Just for fun:

          CSS3:
          head,script{
          display:block;
          }
          script[title]{
          height:100px;
          width:30em;
          background-color:#000;
          color:#fff;
          content:attr(ti tle);
          }

          ;-)

          (BTW: it is _JavaScript_, not Java, there is a difference between those
          two!)


          --
          Anne van Kesteren
          <http://www.annevankest eren.nl/>

          Comment

          • Steve Pugh

            #6
            Re: Java title

            drum118 <drum118@hotmai l.com> wrote:
            [color=blue]
            >First one will tell what the current day is. The 2nd one will tell when the
            >page was last sent to the server. This is on every page.[/color]

            But what will the title attributes do?
            [color=blue]
            >The person reading the text will understand it.[/color]

            Reading what text? Do you expect the person to read the source code to
            see the titles?
            [color=blue]
            >Like I said, I have not try my hand at web design for 3 years and just
            >getting back into it. I just cannot find what I have to do for Title and that
            >is why I am asking the question.[/color]

            There is no title attribute for the script element. Never was and
            probably never will be.

            So again I ask what do you want the browser to do with that title
            attribute?
            [color=blue]
            >As for my other question, all </p>, <br />, and so on closing brackets are
            >there. Just ran the page again today and only spits out title="Today Date"
            >and said nothing about the other JS. So, it have to be the validator that
            >miss read it the first time.[/color]

            Unlikely. The code you posted did have the errors that the validator
            reported. Either the code has changed or you have used the validator's
            doctype over ride to validate it as HTML 4.01 or something. Having
            code with missing </p> can not be valid XHTML.

            Steve

            --
            "My theories appal you, my heresies outrage you,
            I never answer letters and you don't like my tie." - The Doctor

            Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

            Comment

            • drum118

              #7
              Re: Java title

              drum118 wrote:
              [color=blue]
              > What is the current way for stating what a java script TITLE is for
              > xhtml strict since I must be over looking it? W3 validation said there
              > is no title.
              >
              > When I wrote the site 5 years ago to strict xhtml which was validated at
              > w3 site it was like this as well for Bobby:
              > <a id="back"><!-- Today Date --></a>
              > <script type="text/javascript" src="pages/js/today.js" title="Today
              > Date">
              > </script>
              > <br />
              > <!-- Date Page was Updated -->
              > <script type="text/javascript" src="pages/js/update.js" title="Date the
              > page was last updated">
              > </script>
              >
              > Thanks[/color]

              I figure it out to do what I want to do and it validates.

              Change title="Today Date"> to id="Today_Date" > and title="Date the
              page was last updated"> to title="Date_the _page_was_last_ updated">

              Yes I do know the different between Java and Javascript and I should had add
              script to the title.

              Comment

              • Anne van Kesteren

                #8
                Re: Java title

                drum118 wrote:[color=blue]
                > I figure it out to do what I want to do and it validates.
                >
                > Change title="Today Date"> to id="Today_Date" > and title="Date the
                > page was last updated"> to title="Date_the _page_was_last_ updated">[/color]

                I you want to add some extra data to element for someone else who is
                going to look at you code you could use <!-- comment her --> for example ;-)

                --
                Anne van Kesteren
                <http://www.annevankest eren.nl/>

                Comment

                Working...