By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

HTML Code HELP

P: n/a
I am trying to paste the following code into the HTLM editor of my
webpage:

<script src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845350&unit=0&key= 470c828c1eed4306eeef1f0c11d4bf45'></script>

But, it will not display correctly. Here's exactly what it displays:

src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845350&unit=0&key= 470c828c1eed4306eeef1f0c11d4bf45'></script>

It's supposed to be a Weather indicator, but it just shows up as code.
I've tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don't know what the problem.

Sorry for the dubm question, but I'm new with HTML. Thanks,

Garrett
Jul 20 '05 #1
Share this Question
Share on Google+
18 Replies


P: n/a

"Gr8DaddyG" <ga*************@sbcglobal.net> wrote in message
news:9a*************************@posting.google.co m...
I am trying to paste the following code into the HTLM editor of my
webpage:

<script src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>
But, it will not display correctly. Here's exactly what it displays:

src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>
It's supposed to be a Weather indicator, but it just shows up as code.
I've tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don't know what the problem.

Sorry for the dubm question, but I'm new with HTML. Thanks,

Garrett


I put your code into a text file and ran it with MSIE6 and it came up
beautifully. I am learning that MSIE will tolerate many things that other
browsers won't. What browser are you using??

I know from the past couple of days that this code won't validate.

1. MUST HAVE THIS: <script type="text/javascript" .....
i had a similar problem where my page would run fine at home on MSIE, but my
friend's Netscape wouldn't run any of the scripts because i didn't have
type="text/javascript". it didn't display the code as yours did, but again,
what browser are you using?

2. the validator won't accept foo.htm?var=val&var=val --- it wants you to
foo.htm?var=val;var=val
i am having the same problem with my free page counter. i don't think it
would help i if asked the author to change all his code so my page would
validate.

maybe if you addressed issue 1, the script would display properly, hope so,
as it is a nice weather indicator

Toni Mcintyre - ed***********@sasktel.net
http://wildprop.sasktelwebsite.net/4sale/

Jul 20 '05 #2

P: n/a
"Toni Mcintyre" <ed***********@sasktel.net> wrote:
I put your code into a text file and ran it with MSIE6 and it came up
beautifully.
Well, MSIE does odd things with text files, even interpreting them as
HTML documents. Anyway, when I test the OP's <script> element in an HTML
document, it creates the weather forecast, if I allow scripting in my
browser.

Apparently the OP did something wrong in the cut & paste, e.g. pasted the
stuff into a wrong place. By posting the URL of his own document, he
would have saved everyone's time.
1. MUST HAVE THIS: <script type="text/javascript" .....
Well, the type attribute _is_ required by HTML syntax. And let us skip
the embarrassing fact that it's a violation of MIME RFCs, since there is
no registered media type text/javascript. But...
i had a similar problem where my page would run fine at home on MSIE,
but my friend's Netscape wouldn't run any of the scripts because i
didn't have type="text/javascript".
Really? That would be surprising, since all browsers with scripting
support that I know default to JavaScript anyway. But if a type attribute
with a _different_ value is used, then browsers probably ignore the
script element since they think the script is in some unknown language.
2. the validator won't accept foo.htm?var=val&var=val
Naturally it doesn't, and mustn't, since the HTML syntax is violated.
--- it wants
you to foo.htm?var=val;var=val
Nonsense. The validator does not want anything. Did you even read the
validator's FAQ? Did you understand it?

In HTML, the & character as data character should be written as &amp;.
i am having the same problem with my free page counter.


That's surely not the worst problem you have with the free page counter.
The counter itself is the worst problem; it's the archetypal indicator of
childish design and produces worse than useless data.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3

P: n/a
Tim
"Toni Mcintyre" <ed***********@sasktel.net> wrote:
1. MUST HAVE THIS: <script type="text/javascript" .....


"Jukka K. Korpela" <jk******@cs.tut.fi> posted:
Well, the type attribute _is_ required by HTML syntax. And let us skip
the embarrassing fact that it's a violation of MIME RFCs, since there is
no registered media type text/javascript.


Having never used JavaScript I'd not looked into that, I would have thought
that, by now, there was a MIME type for it, but all I see is an
experimental application/x-javascript one.

Is that attribute (in a script element) specifically a MIME type, though?
I see it described in the HTML specifications as a "ContentType" data, "as
per" RFC2045 (en e-mail specification). Though a term like "as per" has
always meant "like" to me, rather than "specifically the same as". It all
seems woefully vague.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #4

P: n/a
Tim <ti*@mail.localhost.invalid> wrote:

Is that attribute (in a script element) specifically a MIME type, though?
I see it described in the HTML specifications as a "ContentType" data, "as
per" RFC2045 (en e-mail specification). Though a term like "as per" has
always meant "like" to me, rather than "specifically the same as". It all
seems woefully vague.


"As per" means "according to". There's no connotation of "like"--it
means "as stated in such-and-such source".
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #5

P: n/a
"Gr8DaddyG" <ga*************@sbcglobal.net> schrieb im Newsbeitrag
news:9a*************************@posting.google.co m...
I am trying to paste the following code into the HTLM editor of my
webpage:

<script src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>
But, it will not display correctly. Here's exactly what it displays:

src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>
It's supposed to be a Weather indicator, but it just shows up as code.
I've tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don't know what the problem.

Sorry for the dubm question, but I'm new with HTML. Thanks,

Garrett


It looks like you pasted the code into the layout view. Paste it into the
code view, then the editor will not change html characters to entities.

HTH
Markus
Jul 20 '05 #6

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message news:<Xn*****************************@193.229.0.31 >...
"Toni Mcintyre" <ed***********@sasktel.net> wrote:
i am having the same problem with my free page counter.


That's surely not the worst problem you have with the free page counter.
The counter itself is the worst problem; it's the archetypal indicator of
childish design and produces worse than useless data.


Not if the data you wanted was how many server requests were made for
the counter - and that can be used as a lower bound for the number of
server requests made for the page linking to the counter. It's not
very accurate for all kinds of reasons, but it's better than nothing
(just preferably get one that doesn't show the number in its graphic,
and hide it away at the bottom of the page next to timestamp, and
users are unlikely to notice it). Of course it's far better to get a
decent host, but not everyone can afford that.

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/
Jul 20 '05 #7

P: n/a
Safalra wrote:
"Jukka K. Korpela" wrote ...
The counter itself is the worst problem; it's the archetypal
indicator of childish design and produces worse than useless data.
Not if the data you wanted was how many server requests were made for
the counter - and that can be used as a lower bound for the number
of server requests made for the page linking to the counter.


Its only possible use is to analyze server load. But surely if you want
this information, server logs are far more useful.
It's not very accurate for all kinds of reasons, but it's better than
nothing.
Why? It doesn't tell you how many people may have viewed your page, nor
even how many requests were made for the page.
Of course it's far better to get a decent host, but not everyone can
afford that.


If you cannot get access to server logs -- which I think is what you're
hinting at with the phrase "decent host" -- then it's hard to imagine
why you need concern yourself with server load.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #8

P: n/a
Safalra wrote:
That's surely not the worst problem you have with the free page counter.
The counter itself is the worst problem; it's the archetypal indicator of
childish design and produces worse than useless data.

Not if the data you wanted was how many server requests were made for
the counter - and that can be used as a lower bound for the number of
server requests made for the page linking to the counter. It's not
very accurate for all kinds of reasons, but it's better than nothing
(just preferably get one that doesn't show the number in its graphic,
and hide it away at the bottom of the page next to timestamp, and
users are unlikely to notice it). Of course it's far better to get a
decent host, but not everyone can afford that.

You don't know how to read log files? Or don't have access to them?
All of the information provide by counters can be found in log files.

--
Stan McCann
Tularosa Basin chapter ABATE of NM Cooordinator, Alamogordo, NM
'94 1500 Vulcan (now wrecked) :(
http://surecann.com/Dcp_2068c.jpg
Jul 20 '05 #9

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Toni Mcintyre" <ed***********@sasktel.net> wrote:
I put your code into a text file and ran it with MSIE6 and it came up
beautifully.


Well, MSIE does odd things with text files, even interpreting them as
HTML documents. Anyway, when I test the OP's <script> element in an HTML
document, it creates the weather forecast, if I allow scripting in my
browser.

Apparently the OP did something wrong in the cut & paste, e.g. pasted the
stuff into a wrong place. By posting the URL of his own document, he
would have saved everyone's time.
1. MUST HAVE THIS: <script type="text/javascript" .....


Well, the type attribute _is_ required by HTML syntax. And let us skip
the embarrassing fact that it's a violation of MIME RFCs, since there is
no registered media type text/javascript. But...
i had a similar problem where my page would run fine at home on MSIE,
but my friend's Netscape wouldn't run any of the scripts because i
didn't have type="text/javascript".


Really? That would be surprising, since all browsers with scripting
support that I know default to JavaScript anyway. But if a type attribute
with a _different_ value is used, then browsers probably ignore the
script element since they think the script is in some unknown language.
2. the validator won't accept foo.htm?var=val&var=val


Naturally it doesn't, and mustn't, since the HTML syntax is violated.
--- it wants
you to foo.htm?var=val;var=val


Nonsense. The validator does not want anything. Did you even read the
validator's FAQ? Did you understand it?

In HTML, the & character as data character should be written as &amp;.
i am having the same problem with my free page counter.


That's surely not the worst problem you have with the free page counter.
The counter itself is the worst problem; it's the archetypal indicator of
childish design and produces worse than useless data.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


excuse me, but i think we went through all this MUST have
type="text/javascript" stuff a couple of days ago
(see: Validating <script> tags 4/19/04)

i learnt (very unfortunately for me) html on http://groups.msn.com/ since i
didn't have any access to the internet except at the library and, yes, MSIE
sucks as far allowing you todo just about anything in the way of
questionable syntax. so, for being away from programming for 6 years, i
picked up some bad habits about html.

anyways, all i know about this is that i was <script>....</script>
everywhere and it worked fine on MSIE and i didn't know any different until
my friend, who works at Sasktel's Internet Support Desk, and is a Netscape
geek, ran the site and NONE of the javascript did ANYTHING at all!!!!

i went to http://validator.w3.org/ and it wouldn't even look at my code with
the <a href="foo.htm?this=that&that=something"> in the page counter. i
looked at all their references and it said that [loosely] "you should now
use this=that ; that=something because & was some special syntax for
something or other".

so, i commented out the counter code (which i'd really like because i'd like
to know if ANYBODY comes to my site) and then it started saying i didn't
need </script> because there was no open <script> tags.

after some discussion on THIS group, i put <script type="text/javascript">
everywhere and (after other issues) my pages started validating and my
Netscape friend can run the site and have it look "something" like i want it
to look.

so - before you are so rude to people who don't have quite as much
experience as you do, you should google "why do i have so much hubris when a
little simple arrogance would do" and see what comes up

no disrespect intended to all the other posters who helped me the other day

Toni Mcintyre - ed***********@sasktel.net
http://wildprop.sasktelwebsite.net/4sale/

Jul 20 '05 #10

P: n/a
On Fri, 23 Apr 2004, Brian wrote:
Not if the data you wanted was how many server requests were made for
the counter - and that can be used as a lower bound for the number
of server requests made for the page linking to the counter.


Its only possible use is to analyze server load. But surely if you want
this information, server logs are far more useful.


Take a look at Mark Nottingham's cacheing tutorial. [1]

On a properly-designed cacheworthy site you can't identify normal
server hits with user access statistics, since many large ISPs
maintain cache server proxies.

However, if you had a tiddly image that's designed to be
non-cacheable, quite a proportion of caches will honour that, and
you'll get somewhat more accurate statistics, without significantly
impairing the response of the site as a whole.

Don't get me wrong - there are all kinds of different reasons why
server statistics tell a story that's quite different from real user
access patterns, no matter what you do.[2] And the harder you try to
make the answers more accurate, the more severely you'll impair the
behaviour of the site. I've known sites where, after they introduced
cookies for visitor tracking, access to the site became as exciting as
watching paint dry, and I bet lots of folks made a note, just as I
did, not to go back again. Just to take one kind of example of what
can go wrong.

Of course, server statistics are great for measuring what they
measure: server load. If you're looking to configure your server,
they're just what you'd need. But don't take them -too- seriously as
an indicator of user behaviour. Did I mention the chap who measured
user access statistics by means of an image being loaded, and who
concluded that the number of Lynx users was vanishingly small?

[1] http://www.mnot.net/cache_docs/

[2] http://www.goldmark.org/netrants/webstats/
Jul 20 '05 #11

P: n/a
[An attribute header got snipped, making it look like I wrote the first
quoted bit of this message; I did not. I've inserted the proper
attribute and moved the others to make it clear who said what.]

Safalra wrote:
if the data you wanted was how many server requests were made
for the counter - and that can be used as a lower bound for the
number of server requests made for the page

On Fri, 23 Apr 2004, Brian wrote: Its only possible use is to analyze server load. But surely if you
want this information, server logs are far more useful.

Alan J. Flavell wrote: Of course, server statistics are great for measuring what they
measure: server load. If you're looking to configure your server,
they're just what you'd need.
Uh, right, that was the point I was trying to make, but apparently I failed.
Did I mention the chap who measured user access statistics by means
of an image being loaded, and who concluded that the number of Lynx
users was vanishingly small?


Nope, and now you've piqued my curiousity. Care to recount the story?

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #12

P: n/a
On Fri, 23 Apr 2004, Brian wrote:
Alan J. Flavell wrote:
Of course, server statistics are great for measuring what they
measure: server load. If you're looking to configure your server,
they're just what you'd need.


Uh, right, that was the point I was trying to make, but apparently I failed.


My apologies - I went off on a trail of consciousness, and somehow
made it look, in the end, as if I was disagreeing with you. My fault
for the careless wording.
Jul 20 '05 #13

P: n/a
Toni Mcintyre wrote:
2. the validator won't accept foo.htm?var=val&var=val --- it wants you to
foo.htm?var=val;var=val


foo.htm?var=val&amp;var=val is also fine, but more work to type.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #14

P: n/a
Stan McCann <st**@surecann.com> wrote in message news:<40********@news.zianet.com>...
Safalra wrote:
[a defence of sorts of visit counters] Of course it's far better to get a
decent host, but not everyone can afford that.

You don't know how to read log files? Or don't have access to them?
All of the information provide by counters can be found in log files.


My defintion of 'decent host' includes access to log files. My point
was that many people on free ISPs will not have have access to log
files.

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/
Jul 20 '05 #15

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote in message news:<10*************@corp.supernews.com>...
Safalra wrote:
"Jukka K. Korpela" wrote ...
The counter itself is the worst problem; it's the archetypal
indicator of childish design and produces worse than useless data.


[snip]
It's not very accurate for all kinds of reasons, but it's better than
nothing.


Why? It doesn't tell you how many people may have viewed your page, nor
even how many requests were made for the page.


Okay, suppose a site has two pages, interesting.html and boring.html.
The visit counter for interesting.html says it has had 1000 visits.
The visit counter for boring.html says it has had 10 visits. We can
say with confidence that interesing.html has almost certainly had more
'actual visits' than boring.html, and the author may decide to devote
his attention to interesting.html.

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/
Jul 20 '05 #16

P: n/a
Safalra wrote:
suppose a site has two pages, interesting.html and boring.html.
The visit counter for interesting.html says it has had 1000 visits.
The visit counter for boring.html says it has had 10 visits. We can
say with confidence that interesing.html has almost certainly had more
'actual visits' than boring.html


We cannot say that will complete confidence. If during a brief period 10
thousand students from a university visit interesting.html, it's
entirely possible that they get counted once on the counter, especially
if the site has been designed competently. I recommend that you take a
look at the pages on cacheing that Alan Flavell points out in his
contribution to this thread.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17

P: n/a
"Toni Mcintyre" <ed***********@sasktel.net> wrote:
excuse me, but i think we went through all this MUST have
type="text/javascript" stuff a couple of days ago
You are not excused. We can easily check what the HTML specification
requires. Whether lack of a required attribute has anything to do with
the observed problem is quite a different question. Do you have any
evidence of that?
so, for being away from programming
for 6 years, i picked up some bad habits about html.
Let me guess... you're trolling?
anyways, all i know about this is that i was <script>....</script>
everywhere and it worked fine on MSIE and i didn't know any different
until my friend, who works at Sasktel's Internet Support Desk, and is
a Netscape geek, ran the site and NONE of the javascript did ANYTHING
at all!!!!
Could you consider stopping the babbling and giving some hard evidence,
or at least facts like URLs?
after some discussion on THIS group, i put <script
type="text/javascript"> everywhere and (after other issues) my pages
started validating and my Netscape friend can run the site and have
it look "something" like i want it to look.
Unless you post the "before" and "after" URLs so that the situation can
be verified, I would say that you have mistaken.
so - before you are so rude to people who don't have quite as much
experience as you do, you should google "why do i have so much hubris
when a little simple arrogance would do" and see what comes up


Oh, so you were not trolling, just trying to make people stop reading
your messages. Thank you for making your point so clearly. So never mind
the URLs - you wouldn't have given the right URLs anyway.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #18

P: n/a
"Toni Mcintyre" <ed***********@sasktel.net> wrote in message news:<10*************@corp.supernews.com>...
"Gr8DaddyG" <ga*************@sbcglobal.net> wrote in message
news:9a*************************@posting.google.co m...
I am trying to paste the following code into the HTLM editor of my
webpage:

<script

src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>

But, it will not display correctly. Here's exactly what it displays:

src='http://voap.weather.com/weather/oap/USFM0004?template=EVNTV&par=1004845
350&unit=0&key=470c828c1eed4306eeef1f0c11d4bf45'></script>

It's supposed to be a Weather indicator, but it just shows up as code.
I've tested the code at
http://www.jmarshall.com/easy/html/testbed.html and it dislpays fine,
so I don't know what the problem.

Sorry for the dubm question, but I'm new with HTML. Thanks,

Garrett


I put your code into a text file and ran it with MSIE6 and it came up
beautifully. I am learning that MSIE will tolerate many things that other
browsers won't. What browser are you using??

I know from the past couple of days that this code won't validate.

1. MUST HAVE THIS: <script type="text/javascript" .....
i had a similar problem where my page would run fine at home on MSIE, but my
friend's Netscape wouldn't run any of the scripts because i didn't have
type="text/javascript". it didn't display the code as yours did, but again,
what browser are you using?

2. the validator won't accept foo.htm?var=val&var=val --- it wants you to
foo.htm?var=val;var=val
i am having the same problem with my free page counter. i don't think it
would help i if asked the author to change all his code so my page would
validate.

maybe if you addressed issue 1, the script would display properly, hope so,
as it is a nice weather indicator

Toni Mcintyre - ed***********@sasktel.net
http://wildprop.sasktelwebsite.net/4sale/


Great, Thank you!
Jul 20 '05 #19

This discussion thread is closed

Replies have been disabled for this discussion.