| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | RE: [ECS] OT:Quick Java question Michael David Thu, 20 Jul 2000 05:21:26 -0400 |
Hi Martin! Thanks – great site, with lots of examples. :-) Cheers! Michael David michael@michaeldavid.com -----Original Message----- From: Martin Terry [mailto:Martin.Terry@mail.tribnet.com] Sent: Monday, July 17, 2000 3:12 PM To: 'ecs-list@netbloc.com' Subject: RE: [ECS] OT:Quick Java question Michael, I'm not a big Java programmer but I've used the following link with a great deal of success. I think I have seen the hover question addressed in their programming examples: http://developer.irt.org/faq.htm Hope this helps. -----Original Message----- From: Michael David [mailto:michael@michaeldavid.com] Sent: Monday, July 17, 2000 10:02 AM To: Ecs-List@Netbloc.Com Subject: [ECS] OT:Quick Java question 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 Martin!
Thanks –
great site, with lots of examples. J
Cheers!
Michael
David
michael@michaeldavid.com
-----Original
Message-----
From: Martin Terry
[mailto:Martin.Terry@mail.tribnet.com]
Sent: Monday, July 17, 2000 3:12
PM
To: 'ecs-list@netbloc.com'
Subject: RE: [ECS] OT:Quick Java
question
Michael, I'm not a big
Java programmer but I've used the following link with a great deal of success.
I think I have seen the hover question addressed in their programming examples:
http://developer.irt.org/faq.htm
Hope this helps.
-----Original Message-----
From: Michael David
[mailto:michael@michaeldavid.com]
Sent: Monday, July 17, 2000 10:02
AM
To: Ecs-List@Netbloc.Com
Subject: [ECS] OT:Quick Java question
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