| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | OT:Quick Java question Michael David Mon, 17 Jul 2000 13:01:58 -0400 |
Hi folks!
Sorry I have been so scarce lately – the startup business is keeping me more
than busy for a while now. The good news is our first site is launching
this week. No, it’s not the automation site – that’s a few sites away
still.
Anyway, I hope you guys will pardon an off-topic question. I figure with
all you guys playing with Mark’s new web stuff, (which I hope to have time
for someday….) that one of you might have some suggestions for me.
I’m not a Java programmer, and no nothing about it – but I try to fake it.
:-) Anyway, I have needed to use a fair amount of on our first site. Now I
need to change the “bookmark message” at the bottom of the screen, and I’m
not sure how to do it.
Here’s what I was thinking:
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0)
&& (parseInt(navigator.appVersion) >= 4))
{
document.write("<U><SPAN
STYLE='color:black;cursor:hand;'onclick='window.external.AddFavorite(locatio
n.href,document.title);'>Click to add this page to your
Favorites!</SPAN></U>");
}
else if ((navigator.appVersion.indexOf('Netscape') != -1)
|| ((navigator.appVersion.indexOf("MSIE") > 0)
&& (parseInt(navigator.appVersion) < 4)))
{
document.write("<B>Hit Control-D to Bookmark this page!<B>");
}
else
{
document.write("<B>Bookmark this page now!<B>");
}
//-->
Of course, it doesn’t work right from the “else if” on. Is that the way to
do an “else if” in Java?
Also, I’d like to do a color-change-on mouse-hover in the first section of
the code, but can’t figure out how to do it. I use hover effects on all the
links on the site (for those with MSIE), and I’d like this link to do the
same thing.
Any advice you guys can offer would be appreciated.
BTW, is it me, or is the Netscape browser (4.73) rather buggy? Trying to
code html for both browsers has been a real pain. Much of the java I have
used senses which browser is being used, and slightly alters the page
accordingly. And, it sure renders slow. Is there something I’m missing
here?
Cheers!
Michael David
michael@michaeldavid.com
Hi folks!
Sorry I have been so scarce lately – the startup business is keeping me more
than busy for a while now. The
good news is our first site is launching this week. No, it’s not the automation site – that’s a few sites away
still.
Anyway, I hope you guys will pardon an off-topic question. I figure with all you guys playing with
Mark’s new web stuff, (which I hope to have time for someday….) that one of you
might have some suggestions for me.
I’m not a Java programmer, and no nothing about it – but I try to fake
it. J Anyway, I have needed to use a fair amount of on our first
site. Now I need to change the “bookmark
message” at the bottom of the screen, and I’m not sure how to do it.
Here’s what I was thinking:
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0)
&&
(parseInt(navigator.appVersion) >= 4))
{
document.write("<U><SPAN
STYLE='color:black;cursor:hand;'onclick='window.external.AddFavorite(location.href,document.title);'>Click
to add this page to your Favorites!</SPAN></U>");
}
else if ((navigator.appVersion.indexOf('Netscape') != -1)
|| ((navigator.appVersion.indexOf("MSIE")
> 0)
&& (parseInt(navigator.appVersion) < 4)))
{
document.write("<B>Hit Control-D to Bookmark this
page!<B>");
}
else
{
document.write("<B>Bookmark this page now!<B>");
}
//-->
Of course, it doesn’t work right from the “else if” on. Is that the way to do an “else if” in
Java?
Also, I’d like to do a color-change-on mouse-hover in the first section
of the code, but can’t figure out how to do it. I use hover effects on all the links on the site (for those
with MSIE), and I’d like this link to do the same thing.
Any advice you guys can offer would be appreciated.
BTW, is it me, or is the Netscape browser (4.73) rather buggy? Trying to code html for both browsers
has been a real pain. Much of the
java I have used senses which browser is being used, and slightly alters the
page accordingly. And, it sure
renders slow. Is there something I’m missing here?
Cheers!
Michael David
michael@michaeldavid.com