473,320 Members | 2,092 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,320 software developers and data experts.

No effect on selection

Hi

I really hope that this posting is not a breach of netiquette.

I keyed in some code copied from p.530 of The Complete Reference HTML
Third Edition which is a popular book. I have listed it below in case
someone might want to paste it into a web page.

It looks pretty - the drop down menu works- and the selection is spot
on, but it doesn't get anything. I expected it to connect to the
selected web site but nothing happens. Could it be that interactive
code is being blocked by IE, or could it be that the code is
deficient.

I wanted to use it as the basis for a navigation bar and this is as
close as I've been so far.

Colin

The code follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Select Navigation</title>
<style type="text/css">
<!--
.nochoice {color: black;}
.choice {color: blue;}

-->
</style>
<script language = "Javascript">
<!--
function redirect(pulldown) {
newlocation = pulldown[pulldown.selectedIndex].value;
if (newlocation != "")
self.location = newlocation;
}
function resetifblank(pulldown){
possiblenewlocation = pulldown[pulldown.selectedIndex].value;
if (possiblenewlocation == "")
pulldown.selectedIndex = 0; /* reset to start */;
}
//-->
</script>
</head>
<body>
<form name = "navForm">
<b>Favourite Sites:</b>
<select name="menu" id="menu" onChange="resetIfBlank(this)">

<option value="" class="nochoice" selected> Choose your site</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Search Sites</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.yahoo.com" class="choice">Yahoo</option>
<option value="http://www.hotbot.com" class="choice">Hotbot</option>
<option value="http://www.google.com" class="choice">Google</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Demos</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.democompany.com" class="choice">Demo
Company</option>

</select>
<input type="button" value="go"
onclick="redirect(document.navForm.menu)">

</form>
<script>
<!--
document.navForm.menu.selectedIndex = 0;
//-->

</script>
</body>
</HTML>

Apr 15 '06 #1
22 2147
VK

me@privacy.net wrote:
<snip>
function resetifblank(pulldown)
<snip>
.... onChange="resetIfBlank(this)">

You have to make a choice how will your function be called (JavaScript
is case-sensitive).

Apr 15 '06 #2
On 15 Apr 2006 02:46:57 -0700, "VK" <sc**********@yahoo.com> wrote:

me@privacy.net wrote:
<snip>
function resetifblank(pulldown)
<snip>
... onChange="resetIfBlank(this)">

You have to make a choice how will your function be called (JavaScript
is case-sensitive).


Thanks,

I never guessed it was my mistake!

Colin
Apr 15 '06 #3
On Sat, 15 Apr 2006 09:38:37 GMT, <me@privacy.net> wrote:
Hi

I really hope that this posting is not a breach of netiquette.

I keyed in some code copied from p.530 of The Complete Reference HTML
Third Edition which is a popular book. I have listed it below in case
someone might want to paste it into a web page.

It looks pretty - the drop down menu works- and the selection is spot
on, but it doesn't get anything. I expected it to connect to the
selected web site but nothing happens. Could it be that interactive
code is being blocked by IE, or could it be that the code is
deficient.

I wanted to use it as the basis for a navigation bar and this is as
close as I've been so far.

Colin

The code follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Select Navigation</title>
<style type="text/css">
<!--
.nochoice {color: black;}
.choice {color: blue;}

-->
</style>
<script language = "Javascript">
<!--
function redirect(pulldown) {
newlocation = pulldown[pulldown.selectedIndex].value;
if (newlocation != "")
self.location = newlocation;
}
function resetifblank(pulldown){
possiblenewlocation = pulldown[pulldown.selectedIndex].value;
if (possiblenewlocation == "")
pulldown.selectedIndex = 0; /* reset to start */;
}
//-->
</script>
</head>
<body>
<form name = "navForm">
<b>Favourite Sites:</b>
<select name="menu" id="menu" onChange="resetIfBlank(this)">

<option value="" class="nochoice" selected> Choose your site</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Search Sites</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.yahoo.com" class="choice">Yahoo</option>
<option value="http://www.hotbot.com" class="choice">Hotbot</option>
<option value="http://www.google.com" class="choice">Google</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Demos</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.democompany.com" class="choice">Demo
Company</option>

</select>
<input type="button" value="go"
onclick="redirect(document.navForm.menu)">

</form>
<script>
<!--
document.navForm.menu.selectedIndex = 0;
//-->

</script>
</body>
</HTML>


Hi

I have corrected the code and it works fine now.

I wanted to change the line below so that it called a web page in the
same folder but it won't do it with my code.

<option value="http://www.democompany.com" class="choice">Demo
Company</option>

I tried :
<option value="p70.htm" class="choice">Page 370</option>

where p370.htm is the page I wanted to load.

The full path is D:\webs\HTML\p370.htm. The page with the code is in
the same folder.

I have tried lots of other guesses but to no avail
I have tried the full relative reference href="filename.ext" and it
doesn't work. Can anyone help, please.

Colin
Apr 15 '06 #4
On Sat, 15 Apr 2006 09:38:37 GMT, <me@privacy.net> wrote:
Hi

I really hope that this posting is not a breach of netiquette.

I keyed in some code copied from p.530 of The Complete Reference HTML
Third Edition which is a popular book. I have listed it below in case
someone might want to paste it into a web page.

It looks pretty - the drop down menu works- and the selection is spot
on, but it doesn't get anything. I expected it to connect to the
selected web site but nothing happens. Could it be that interactive
code is being blocked by IE, or could it be that the code is
deficient.

I wanted to use it as the basis for a navigation bar and this is as
close as I've been so far.

Colin

The code follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Select Navigation</title>
<style type="text/css">
<!--
.nochoice {color: black;}
.choice {color: blue;}

-->
</style>
<script language = "Javascript">
<!--
function redirect(pulldown) {
newlocation = pulldown[pulldown.selectedIndex].value;
if (newlocation != "")
self.location = newlocation;
}
function resetifblank(pulldown){
possiblenewlocation = pulldown[pulldown.selectedIndex].value;
if (possiblenewlocation == "")
pulldown.selectedIndex = 0; /* reset to start */;
}
//-->
</script>
</head>
<body>
<form name = "navForm">
<b>Favourite Sites:</b>
<select name="menu" id="menu" onChange="resetIfBlank(this)">

<option value="" class="nochoice" selected> Choose your site</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Search Sites</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.yahoo.com" class="choice">Yahoo</option>
<option value="http://www.hotbot.com" class="choice">Hotbot</option>
<option value="http://www.google.com" class="choice">Google</option>
<option value="" class="nochoice"></option>
<option value="" class="nochoice">Demos</option>
<option value=""
class="nochoice">---------------------------------</option>
<option value="http://www.democompany.com" class="choice">Demo
Company</option>

</select>
<input type="button" value="go"
onclick="redirect(document.navForm.menu)">

</form>
<script>
<!--
document.navForm.menu.selectedIndex = 0;
//-->

</script>
</body>
</HTML>

I have solved the last problem by including the whole path. viz.,
"D:\webs\HTML\p370.htm". Is this normal? Surely IE was already
logged onto the HTML folder. That was the one I was working in.

Is there a way to prevent my pictures and other content being
downloaded by browsers?

Colin
Apr 16 '06 #5
On Sun, 16 Apr 2006 08:04:41 GMT, me@privacy.net wrote:

<< snipped >>

Is there a way to prevent my pictures and other content being
downloaded by browsers?

Colin


Colin, think about it - you put a picture up on your web site, a user comes
along to view your web site, his browser puts the picture up on his screen
from the web cache (temp file area) so by the time he sees it, it's on his
machine ... and from there almost anyone can do whatever they want with it.

The standard line goes something like - "Well, the best way to make sure
someone doesn't copy it is to not put it up on your web site."

//al
Apr 16 '06 #6
me@privacy.net wrote:
I have solved the last problem
Last problem? The fact that your menu won't work at all for the
percentage of visitors who have JavaScript disabled, or not available?
Estimates vary, but could easily be ten percent of your visitors.
by including the whole path. viz., "D:\webs\HTML\p370.htm". Is this
normal?
No. We cannot see your local hard drive.
Surely IE was already logged onto the HTML folder. That was the one I
was working in.
Use relative pathing. IE? Have you looked at your pages in other
browsers?
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Asked and answered TNTC times. How would the visitor see the pictures
and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.

--
-bts
-Warning: I brake for lawn deer
Apr 16 '06 #7
me@privacy.net wrote:
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Short answer: No!
--
AGw.

Apr 16 '06 #8
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
I have solved the last problem


Last problem? The fact that your menu won't work at all for the
percentage of visitors who have JavaScript disabled, or not available?
Estimates vary, but could easily be ten percent of your visitors.
by including the whole path. viz., "D:\webs\HTML\p370.htm". Is this
normal?


No. We cannot see your local hard drive.
Surely IE was already logged onto the HTML folder. That was the one I
was working in.


Use relative pathing. IE? Have you looked at your pages in other
browsers?
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Asked and answered TNTC times. How would the visitor see the pictures
and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.


A few months ago aI was given a photographers web site address to look
at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.

Colin
Apr 16 '06 #9
me@privacy.net wrote:
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Asked and answered TNTC times. How would the visitor see the
pictures and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.


A few months ago aI was given a photographers web site address to
look at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.


Post the URL and someone will crack it in ... ten seconds?

--
-bts
-Warning: I brake for lawn deer
Apr 16 '06 #10
<me@privacy.net> writes:
A few months ago aI was given a photographers web site address to look
at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.


There's a button on your keyboard marked 'Print Screen'. Good luck
finding something to beat that.

Alternatively, switching browsers and/or turning Javascript off is
generally a 100% reliable way to bypass these.

Also, if you can find the URL of the image by viewing the source of
the page you can just wget it.

The ways to stop people stealing your images are (in decreasing order
of effectiveness):
- not put the images up there in the first place
- watermark the images or make them sufficiently small to be useless
to steal (which is effective for photography sales - you might be able
to tell what the photo is of and whether it's worth buying, but you won't
be able to use it if you download it).
- hire a lawyer and set them on anyone who does.

--
Chris
Apr 16 '06 #11
me@privacy.net wrote:
A few months ago aI was given a photographers web site address to look
at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.


Content thieves are like burglars in the real world: you can
inconvenience them, and perhaps convince them to go and trouble someone
else who seems easier prey... but when it comes down to it, they'll get
what they want if they want it badly enough.
--
AGw

Apr 16 '06 #12
To further the education of mankind, <me@privacy.net> vouchsafed:
There is no way to prevent someone from copying your images.


A few months ago aI was given a photographers web site address to look
at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.


The only effective way of doing that is to make the images undesirable and
worthless.

One tactic is to show only part of the image. Another, render the image in
black-and-white and/or blur it considerably. Another, offer only a very
low quality jpeg. Etc. All can include size-reduction as well.

--
Neredbojias
Infinity can have limits.
Apr 16 '06 #13
On Sun, 16 Apr 2006, me@privacy.net wrote:
"Beauregard T. Shagnasty" wrote:
There is no way to prevent someone from copying your images.


A few months ago aI was given a photographers web site address to
look at wedding photos. When I tried to download them I simply got a
message on screen saying that they were protected. It seems that
there is some way of doing it.


Er, no: there is evidently a way of fooling you into thinking it can
be done, but it only "protects" against the clue-impaired. Nobody who
was serious about getting a copy would be hindered. As such, we
generally rate such methods as ineffective.

If you really want to learn more about it, try reading previous
responses on the topic. If you're eager to convince yourself that it
can be done, just stop paying attention - nobody really minds if you
want to fool yourself.
Apr 16 '06 #14
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
I have solved the last problem


Last problem? The fact that your menu won't work at all for the
percentage of visitors who have JavaScript disabled, or not available?
Estimates vary, but could easily be ten percent of your visitors.
by including the whole path. viz., "D:\webs\HTML\p370.htm". Is this
normal?


No. We cannot see your local hard drive.
Surely IE was already logged onto the HTML folder. That was the one I
was working in.


Use relative pathing. IE? Have you looked at your pages in other
browsers?
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Asked and answered TNTC times. How would the visitor see the pictures
and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.

You were right! At the bottom of IE the message is "Error on page".
I don't know exactly what that means.

You can see it in action at www.the-whistle-blower.org.

Colin
Apr 16 '06 #15
me@privacy.net wrote:
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
There is no way to prevent someone from copying your images.
You were right! At the bottom of IE the message is "Error on page".
I don't know exactly what that means.


It usually means that there's a problem with your JavaScript.
You can see it in action at www.the-whistle-blower.org.


See what in action?

Incidentally, your (?) page is in dire need of some major surgery...
--
AGw.

Apr 16 '06 #16
me@privacy.net wrote:
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
I have solved the last problem
Last problem? The fact that your menu won't work at all for the
percentage of visitors who have JavaScript disabled, or not
available? Estimates vary, but could easily be ten percent of your
visitors.
by including the whole path. viz., "D:\webs\HTML\p370.htm". Is this
normal?


No. We cannot see your local hard drive.
Surely IE was already logged onto the HTML folder. That was the one
I was working in.


Use relative pathing. IE? Have you looked at your pages in other
browsers?
Is there a way to prevent my pictures and other content being
downloaded by browsers?


Asked and answered TNTC times. How would the visitor see the
pictures and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.


You were right!


About which of the above pieces of advice? All, I would assume. <g>
At the bottom of IE the message is "Error on page".
I don't know exactly what that means.

You can see it in action at www.the-whistle-blower.org.


You have some kind of error on the page that IE doesn't know how to deal
with. I don't use IE. In my Firefox, there is no "error on page" with
JavaScript disabled /or/ enabled. Once I enabled JavaScript, the only
difference I saw was a rather obnoxious marquee banner with a quote from
MLK.

I'm of the persuasion that real web pages don't have distracting
movement, unless expected such as a movie.

Your drop-down selection does not work when JavaScript is off, or
unavailable such as it may be stripped by a corporate firewall. Don't
use it for anything important.

You need to fix your banner image. At 107.18 KB (109,757 bytes) it is
way too heavy. And don't resize an image using HTML height and width.

--
-bts
-Warning: I brake for lawn deer
Apr 17 '06 #17
On Sun, 16 Apr 2006, Beauregard T. Shagnasty wrote:

[about www.the-whistle-blower.org ]
I'm of the persuasion that real web pages don't have distracting
movement, unless expected such as a movie.
Indeed. And those of us who wander the web with image animations
disabled by default, get just an inscrutable dotted rectangle where
this page's "mail me" icon was supposed to be. Quite apart from the
lack of the mandatory "alt" attribute on the "mailme" image.

A curious form of censorship...

It's good practice to make animated images in such a way that both the
first and last frames show a meaningful static image. Not that I'd
actually recommend using animated gifs for these kind of purposes -
they're so distracting from any main content. And surely the author
wants the reader to concentrate on the main content, no?
Your drop-down selection does not work when JavaScript is off,
Does it even work when it's on? I just get the browser alert
"d is not a registered protocol"

Seems to me there's some conceptual error here: whenever one sees
internal details of a web site's file system in a web page, such as
this -

<option value="D:\webs\html\greenbelt.htm" ...>

it's pretty clear that something is going fundamentally wrong.

The server in question reports itself as:

Server: Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7d

- so it's not as if this server would have anything resembling a
"D: disk" anyway.
You need to fix your banner image.
In several ways, indeed. It's far too wide, and (even if the other
problems were resolved, e.g the pixel-specified table width) would
prevent the rest of the page from fitting itself into my chosen
browser window.

The author seems to have missed all of the developments towards
flexible design in the last 10 years or so.
At 107.18 KB (109,757 bytes) it is way too heavy.
Just looking at it, it seems obvious to me that it's using the wrong
image format for this image content. This kind of image is unsuited
to an indexed image format (gif, or indexed PNG), and would be better
saved as a JPEG.

I was able to more than halve the file size, even without scaling the
image down, just by re-saving it as a JPEG at a reasonable q factor.
Sure, JPEG doesn't support transparency, but I don't see any need for
transparency in this image.
And don't resize an image using HTML height and width.


Indeed, since the only thing one can do in HTML is to nominate a
different size in pixel units, and that's better done by rescaling the
image itself, before sending it, since image manipulation tools can do
a better job of rescaling than browsers will typically do when asked
to rescale an image.

Rescaling in CSS is different, since one can specify a size in other
units, e.g em units, which can't be achieved on the www in any other
way. This can be a useful technique, in some situations, for keeping
images and text in scale to each other.

But really, most of *this* image is just text, and that part would be
more web-compatibly done by styling some real text on a suitable
CSS-specified background image. For the color-graded area, the
background image itself could be a thin horizontal strip, using
repeat-y to fill the area. 0.5kbytes should be ample for creating
such a colour grading, although the bandwidth saving is not the major
motivation nowadays - just a nice side-effect of "doing the job
properly". Another nice side effect would be that the actual width of
the image, when put into a CSS background, would not interfere with
flexible design - any of it that didn't fit into a particular reader's
window width would just spill harmlessly off the edge, if you see what
I mean.

Anyway, this page would need quite a bit of work to get it even up to
the standards of the "transitional" quirks-mode page that it seems
it's aiming to be. But that's so last-millennium by now.

I suspect the author is to an extent hampered by some authoring tool,
that's promoting a way of working which is inappropriate by current
guidelines and recommendations. BICBW.

regards
Apr 17 '06 #18
On Sun, 16 Apr 2006 23:56:36 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
On Sun, 16 Apr 2006 13:46:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:

I have solved the last problem

Last problem? The fact that your menu won't work at all for the
percentage of visitors who have JavaScript disabled, or not
available? Estimates vary, but could easily be ten percent of your
visitors.

by including the whole path. viz., "D:\webs\HTML\p370.htm". Is this
normal?

No. We cannot see your local hard drive.

Surely IE was already logged onto the HTML folder. That was the one
I was working in.

Use relative pathing. IE? Have you looked at your pages in other
browsers?

Is there a way to prevent my pictures and other content being
downloaded by browsers?

Asked and answered TNTC times. How would the visitor see the
pictures and 'other content' if the browser couldn't download it?

There is no way to prevent someone from copying your images.
You were right!


About which of the above pieces of advice? All, I would assume. <g>


The bit that said "Last problem?"

At the bottom of IE the message is "Error on page".
I don't know exactly what that means.

You can see it in action at www.the-whistle-blower.org.
You have some kind of error on the page that IE doesn't know how to deal
with. I don't use IE. In my Firefox, there is no "error on page" with
JavaScript disabled /or/ enabled. Once I enabled JavaScript, the only
difference I saw was a rather obnoxious marquee banner with a quote from
MLK.


It's a lovely marquee banner.

My pal has been urging me to use firefox - maybe I shall. I could
always just set up some relative references to the topic pages and do
without anything fancy. I f I created a nav bar in Dreaaamweaver MX
would it make a difference?
I'm of the persuasion that real web pages don't have distracting
movement, unless expected such as a movie.

Your drop-down selection does not work when JavaScript is off, or
unavailable such as it may be stripped by a corporate firewall. Don't
use it for anything important.

You need to fix your banner image. At 107.18 KB (109,757 bytes) it is
way too heavy. And don't resize an image using HTML height and width.


I created it in MS Photodraw. How should I convert it but leave it the
same size?

Colin
Apr 17 '06 #19
On Mon, 17 Apr 2006 10:23:50 +0100, "Alan J. Flavell"
<fl*****@physics.gla.ac.uk> wrote:
On Sun, 16 Apr 2006, Beauregard T. Shagnasty wrote:

[about www.the-whistle-blower.org ]
I'm of the persuasion that real web pages don't have distracting
movement, unless expected such as a movie.
Indeed. And those of us who wander the web with image animations
disabled by default, get just an inscrutable dotted rectangle where
this page's "mail me" icon was supposed to be. Quite apart from the
lack of the mandatory "alt" attribute on the "mailme" image.

A curious form of censorship...

It's good practice to make animated images in such a way that both the
first and last frames show a meaningful static image. Not that I'd
actually recommend using animated gifs for these kind of purposes -
they're so distracting from any main content. And surely the author
wants the reader to concentrate on the main content, no?
Your drop-down selection does not work when JavaScript is off,


Does it even work when it's on? I just get the browser alert
"d is not a registered protocol"

Seems to me there's some conceptual error here: whenever one sees
internal details of a web site's file system in a web page, such as
this -

<option value="D:\webs\html\greenbelt.htm" ...>

it's pretty clear that something is going fundamentally wrong.

The server in question reports itself as:

Server: Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7d

- so it's not as if this server would have anything resembling a
"D: disk" anyway.


That's why I didn't ask "is this right", but "is this normal". I was
astonished to find that it worked in XP on my PC with a full path but
not without it. I'm fair;y new to web programming but I've done a bit
of programming for decades and I've never known the need to use the
full path to find a file that's already in the working directory along
with everything else.

Does anyone know what code would work at that point?

You need to fix your banner image.


In several ways, indeed. It's far too wide, and (even if the other
problems were resolved, e.g the pixel-specified table width) would
prevent the rest of the page from fitting itself into my chosen
browser window.

The author seems to have missed all of the developments towards
flexible design in the last 10 years or so.
At 107.18 KB (109,757 bytes) it is way too heavy.


Just looking at it, it seems obvious to me that it's using the wrong
image format for this image content. This kind of image is unsuited
to an indexed image format (gif, or indexed PNG), and would be better
saved as a JPEG.

I was able to more than halve the file size, even without scaling the
image down, just by re-saving it as a JPEG at a reasonable q factor.
Sure, JPEG doesn't support transparency, but I don't see any need for
transparency in this image.
And don't resize an image using HTML height and width.


Indeed, since the only thing one can do in HTML is to nominate a
different size in pixel units, and that's better done by rescaling the
image itself, before sending it, since image manipulation tools can do
a better job of rescaling than browsers will typically do when asked
to rescale an image.

Rescaling in CSS is different, since one can specify a size in other
units, e.g em units, which can't be achieved on the www in any other
way. This can be a useful technique, in some situations, for keeping
images and text in scale to each other.

But really, most of *this* image is just text, and that part would be
more web-compatibly done by styling some real text on a suitable
CSS-specified background image. For the color-graded area, the
background image itself could be a thin horizontal strip, using
repeat-y to fill the area. 0.5kbytes should be ample for creating
such a colour grading, although the bandwidth saving is not the major
motivation nowadays - just a nice side-effect of "doing the job
properly". Another nice side effect would be that the actual width of
the image, when put into a CSS background, would not interfere with
flexible design - any of it that didn't fit into a particular reader's
window width would just spill harmlessly off the edge, if you see what
I mean.

Anyway, this page would need quite a bit of work to get it even up to
the standards of the "transitional" quirks-mode page that it seems
it's aiming to be. But that's so last-millennium by now.

I suspect the author is to an extent hampered by some authoring tool,
that's promoting a way of working which is inappropriate by current
guidelines and recommendations. BICBW.

regards

Colin
Apr 17 '06 #20
me@privacy.net wrote:
On Sun, 16 Apr 2006 23:56:36 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote: <bigsnip>
About which of the above pieces of advice? All, I would assume. <g>


The bit that said "Last problem?"
You can see it in action at www.the-whistle-blower.org.


You have some kind of error on the page that IE doesn't know how to
deal with. I don't use IE. In my Firefox, there is no "error on
page" with JavaScript disabled /or/ enabled. Once I enabled
JavaScript, the only difference I saw was a rather obnoxious marquee
banner with a quote from MLK.


It's a lovely marquee banner.


...but still draws the eye away from your content. If the quote is that
important to you, use some proper markup, perhaps <blockquote> and
<cite>. Perhaps:

<blockquote>
<p>
To defeat injustice you must first make it visible.
<cite title="by Martin Luther King">Martin Luther King</cite>
</p>
</blockquote>

...then style those two elements to taste.
My pal has been urging me to use firefox - maybe I shall.
It is recommended to always test your pages in several major browsers.
At the very least, IE6, Firefox, Opera.
I could always just set up some relative references to the topic pages
and do without anything fancy.
For those "D:\" links? Yes, use relative pathing, not for some directory
on your own hard drive.
I f I created a nav bar in Dreaaamweaver MX would it make a
difference?


Couldn't tell you anything about Dreamweaver. I code by hand.
You need to fix your banner image. At 107.18 KB (109,757 bytes) it is
way too heavy. And don't resize an image using HTML height and
width.


I created it in MS Photodraw. How should I convert it but leave it
the same size?


See Alan's advice about the image.

--
-bts
-Warning: I brake for lawn deer
Apr 17 '06 #21
<me@privacy.net> writes:
On Mon, 17 Apr 2006 10:23:50 +0100, "Alan J. Flavell"
<fl*****@physics.gla.ac.uk> wrote:
Seems to me there's some conceptual error here: whenever one sees
internal details of a web site's file system in a web page, such as
this -

<option value="D:\webs\html\greenbelt.htm" ...>

it's pretty clear that something is going fundamentally wrong.

The server in question reports itself as:

Server: Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7d

- so it's not as if this server would have anything resembling a
"D: disk" anyway.
That's why I didn't ask "is this right", but "is this normal". I was
astonished to find that it worked in XP on my PC with a full path but
not without it.


I'm not surprised in the least. It worked on your PC because on your PC
that's (presumably) a correct path to the file on your PC.
I'm fair;y new to web programming but I've done a bit
of programming for decades and I've never known the need to use the
full path to find a file that's already in the working directory along
with everything else.


Frankly, I don't see the problem. The error message says that "D" is an
invalid scheme, right? So, your browser is obviously interpreting the
above as a fully-qualified URL.

The solution is obvious and blindingly simple: Since your browser wants
a fully-qualified URL, give it one.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Apr 17 '06 #22
On Mon, 17 Apr 2006 13:34:49 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
me@privacy.net wrote:
On Sun, 16 Apr 2006 23:56:36 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:<bigsnip>
About which of the above pieces of advice? All, I would assume. <g>


The bit that said "Last problem?"
You can see it in action at www.the-whistle-blower.org.

You have some kind of error on the page that IE doesn't know how to
deal with. I don't use IE. In my Firefox, there is no "error on
page" with JavaScript disabled /or/ enabled. Once I enabled
JavaScript, the only difference I saw was a rather obnoxious marquee
banner with a quote from MLK.


It's a lovely marquee banner.


..but still draws the eye away from your content. If the quote is that
important to you, use some proper markup, perhaps <blockquote> and
<cite>. Perhaps:

<blockquote>
<p>
To defeat injustice you must first make it visible.
<cite title="by Martin Luther King">Martin Luther King</cite>
</p>
</blockquote>

..then style those two elements to taste.


Many thanks. I realise that I'm not very good and should do much
better.

My pal has been urging me to use firefox - maybe I shall.
It is recommended to always test your pages in several major browsers.
At the very least, IE6, Firefox, Opera.
I could always just set up some relative references to the topic pages
and do without anything fancy.


For those "D:\" links? Yes, use relative pathing, not for some directory
on your own hard drive.


Done.
I f I created a nav bar in Dreaaamweaver MX would it make a
difference?


Couldn't tell you anything about Dreamweaver. I code by hand.
You need to fix your banner image. At 107.18 KB (109,757 bytes) it is
way too heavy. And don't resize an image using HTML height and
width.


I created it in MS Photodraw. How should I convert it but leave it
the same size?


See Alan's advice about the image.


Very good. Thank you.

Colin

Apr 17 '06 #23

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

Similar topics

1
by: Martin Karlsson | last post by:
Hi guys, Does anyone know how I can restore a selection created with createRange()? The problem is that I have a function that opens a new window with window.open() which of course makes the...
15
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange)...
1
by: bob | last post by:
I asked a question yesterday about how I would parse a Word document using functions in some Interop.Word COM. Some told me to run a macro in Word to see how it works. Most of the code was......
5
by: STeve | last post by:
Hey guys, I currently have a 100 page word document filled with various "articles". These articles are delimited by the Style of the text (IE. Heading 1 for the various titles) These articles...
0
by: Charles Law | last post by:
I have a user control which can be dragged and dropped onto a form in my application when it is running. I draw a selection border around my control, and allow it to be dragged to a new location on...
1
by: 4Ankit | last post by:
Hey guys i am having some trouble with nesting one selection structure within another selection structure. At the moment i am unclear what selection structures are and just need a simple example of...
5
by: Jure Bogataj | last post by:
Hi all! I have a problem (performance issue) with listview. I have implemented an ItemSelectionChange on my listview and put some code in it (I build some toolbar based on selection and update...
2
by: vanditnagar | last post by:
Hi, I am facing the difficulty in the selecting a text on the browser . And highlighting the text. I am using the window.getSelection() to get the object and after...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.