473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

Jul 20 '05 #1
7 2604
drum118 <dr*****@hotmail.com> wrote:
What is the current way for stating what a java script TITLE is for
xhtml strict since I must be over looking it?
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.
W3 validation said there is no title.
Correct.
When I wrote the site 5 years ago to strict xhtml which was validated at
w3 site
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.
it was like this as well for Bobby:
Bobby doesn't check the validity of the code and hence is irrelevant.
<script type="text/javascript" src="pages/js/today.js" title="Today
Date">
</script>


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 <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
Steve Pugh wrote:
drum118 <dr*****@hotmail.com> wrote:
What is the current way for stating what a java script TITLE is for
xhtml strict since I must be over looking it?


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.
W3 validation said there is no title.


Correct.
When I wrote the site 5 years ago to strict xhtml which was validated at
w3 site


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.
it was like this as well for Bobby:


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


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 <st***@pugh.net> <http://steve.pugh.net/>


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
Jul 20 '05 #3
drum118 wrote:
Steve Pugh wrote:
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.

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.


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/>
Jul 20 '05 #4
Steve Pugh wrote:
<script type="text/javascript" src="pages/js/today.js" title="Today
Date">
</script>

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


Just for fun:

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

;-)

(BTW: it is _JavaScript_, not Java, there is a difference between those
two!)
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #5
drum118 <dr*****@hotmail.com> wrote:
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.
But what will the title attributes do?
The person reading the text will understand it.
Reading what text? Do you expect the person to read the source code to
see the titles?
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.
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?
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.


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 <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6
drum118 wrote:
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


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.

Jul 20 '05 #7
drum118 wrote:
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">


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.annevankesteren.nl/>
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: apchar | last post by:
I am trying to use php as a kind of servlet to act as a middle man between a java applet and mysql. I know java has jdbc but it's flakey and painful. php access to mysql is much nicer. So I have:...
73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
4
by: acemann7 | last post by:
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
by: shaolinman829 | last post by:
My collegue and I are at the point of pulling our hair out. I'm currently writting a little piece of Java code to send an email confirmation page that sends both html and text. Not a problem. In my...
3
by: ITQUEST | last post by:
The moderator posted this in another thread: (I am starting a new one not to confuse the other subject at hand) ".java classes are compiled to into .class files. If you have a .java file called...
10
by: ITQUEST | last post by:
I am on the second step of my Inventory Project and can properly run my Inventory2.java file but not my Product2.java file. I get the following error: 71:cannot find symbol, symbol: method...
0
by: r035198x | last post by:
Inheritance We have already covered one important concept of object-oriented programming, namely encapsulation, in the previous article. These articles are not articles on object oriented...
5
by: Kiamari | last post by:
I'm new to Java and sort of stuck.... this is what i have to do: Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD...
7
by: svpriyan | last post by:
Dear Buddies, I have two Java Prog: My task is to read the Content of the file and write to an XML file. so i started doing it perfectly... What i have problem is when i tried to execute the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.