Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#44024 - 28/10/2001 14:42 Javascript image popups?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
I'm trying to compose a "What do the remote buttons do" page for the FAQ at riocar.org.

Ideally, I'd like to have GIF pictures of the Rio and Kenwood remotes up on the screen, then when the mouse moves over a button, have a small window pop up describing the function of that button. This window could be either over the button, or it could be text below the image.

I would want the text to be easily modifiable. In other words, putting up a GIF of the text is not desired.

I assume Javascript would be the easiest way to do this. does anyone have any example code for this?

Note: Things I'd like to avoid: Slicing up the image (I'd rather enter X/Y numbers into code than slice the image), using the browser's status bar text (I know how to do that, it's cheesy), and putting up message boxes that require an OK confirmation (I could do that too, but it would be irritating to use).
_________________________
Tony Fabris

Top
#44025 - 28/10/2001 14:45 Re: Javascript image popups? [Re: tfabris]
ChrisTall
new poster

Registered: 24/10/2000
Posts: 21
Loc: South Wales, UK
Try to look at teh source of DVD World as they to a similar type of thing to display info about DVDs when you move your mouse over the thumbnail. I have briefly glanced at the code and it looks pretty hefty...


Edited by ChrisTall (28/10/2001 14:46)
_________________________
ChrisTall That really is my name!

Top
#44026 - 28/10/2001 14:54 Re: Javascript image popups? [Re: ChrisTall]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
That is precisely the sort of thing I'm looking for. Now, to figure out how to implement it!

If anyone has anything more easily pre-packaged, let me know.
_________________________
Tony Fabris

Top
#44027 - 28/10/2001 15:14 Re: Javascript image popups? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Hmm. Got bits of it working in my own code already. Kinda spiffy. Working on boiling it down to its simplest components and figuring out how to make it mine.
_________________________
Tony Fabris

Top
#44028 - 28/10/2001 15:46 Re: Javascript image popups? [Re: tfabris]
Captain_Chaos
member

Registered: 18/11/2000
Posts: 126
Loc: Amersfoort, The Netherlands
You could use the ALT attribute of the IMG tag. Originally it was supposed to contain a textual description of the image, to be shown by browsers that can't display images. These days it's (ab)used by Internet Explorer and Netscape to display a tooltip when the mouse hovers over the image.

/Pepijn

Top
#44029 - 28/10/2001 15:48 Re: Javascript image popups? [Re: Captain_Chaos]
Captain_Chaos
member

Registered: 18/11/2000
Posts: 126
Loc: Amersfoort, The Netherlands
Aha, but you don't want to slice up the image. Never mind...

/Pepijn

Top
#44030 - 28/10/2001 15:49 Re: Javascript image popups? [Re: Captain_Chaos]
Captain_Chaos
member

Registered: 18/11/2000
Posts: 126
Loc: Amersfoort, The Netherlands
I have got to start reading more than one sentence of each post...

/Pepijn

Top
#44031 - 28/10/2001 15:53 Re: Javascript image popups? [Re: Captain_Chaos]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
No, that's a valid comment. I actually thought about using the Alt text, but I had some other stuff I wanted to do with it. Main problem is that the Alt text isn't implemented as a tooltip for every browser.

I might end up slicing up the images anyway. The stuff I'm stealing from dvdworld wants it as separate images. I could hack the code to allow a single image, but I think I can get the job done more quickly if I just bite the bullet and slice the image.
_________________________
Tony Fabris

Top
#44032 - 28/10/2001 16:37 Re: Javascript image popups? [Re: tfabris]
beaker
addict

Registered: 19/08/2000
Posts: 588
Loc: England
Tony, take a look here. Is this what you're after?
_________________________
Marcus 32 gig MKII (various colours) & 30gig MKIIa

Top
#44033 - 28/10/2001 17:01 Re: Javascript image popups? [Re: beaker]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Doesn't work well with Netscape 6 I'm afraid, replaces the whole page with the text instead of just showing the text on the side.

Oh the joys of cross-browser compatibilty! Thank goodness I now work in exclusively on Intranet apps where I can not only specifiy the "flavour" of browser but also the version and service pack number...
_________________________
Remind me to change my signature to something more interesting someday

Top
#44034 - 28/10/2001 17:04 Re: Javascript image popups? [Re: andy]
beaker
addict

Registered: 19/08/2000
Posts: 588
Loc: England
hmmm... yeah cross-browser (in)compatibility is a real PITA. It was just something I knocked up quickly. Maybe if I used a different type of tag for defining the layer that would work better.
_________________________
Marcus 32 gig MKII (various colours) & 30gig MKIIa

Top
#44035 - 28/10/2001 17:12 Re: Javascript image popups? [Re: beaker]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Yes, I am afraid even for all my personal stuff I tend to assume that people have access to IE5+ nowadays. I really don't have the time or energy to make it work 100% with Netscape or earlier versions of IE. I get such a small percentage of non-IE5 users visiting anyway...
_________________________
Remind me to change my signature to something more interesting someday

Top
#44036 - 28/10/2001 21:21 Re: Javascript image popups? [Re: beaker]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Yes, that is what I was after, thanks!. Of course, now it's too late, I've already implemented something based on ripping off the DVDWorld code.

Hang on to that, though, if there ends up being a problem with the DVDWorld version, I will need to fall back on it.

I don't have NS6 to test against, we'll see how it does with the DVDWorld code once I've put it up.
_________________________
Tony Fabris

Top
#44037 - 28/10/2001 22:50 Re: Javascript image popups? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Okay, I'm working on the implementation of the page and I'm filling out the data. I have some questions. Can anyone help me out?

What does the button 9 do on the Kenwood/Rio. It is labeled as "title" on the Rio. What does "title" mean in relation to what the button does?

I'm testing this out at my desk and I don't have the tuner hooked up here. Also, my Mk1 sled is no longer in a car so I can't check the Mk1 tuner functions at this time:

How do you switch AM/FM on the Mk2 tuner with the Rio remote? Is it just a hit of the Tuner button? And with the Kenwood remote, is it the same thing (hit tuner), or do the AM/FM buttons on the Kenwood remote actually do that? If not, what do the FF/REW buttons on the Kenwood do in tuner mode?

I'm sure I'll come up with some more as I work on this... And anything I don't get answered here I'm sure I can figure out for myself if I play with it...
_________________________
Tony Fabris

Top
#44038 - 29/10/2001 05:22 Re: Javascript image popups? [Re: tfabris]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
One suggestion: make the image an image-map, with links to the descriptions of each button. Have the button name be the ALT of the AREA (may be useful for graphical as well as non-graphical browsers), and the full labelling as TITLE.

No Javascript anywhere (even on the one browser I use that supports it, I generally never enable it) and makes sense on text and graphical browsers.
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#44039 - 29/10/2001 05:25 Re: Javascript image popups? [Re: tfabris]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
In reply to:

What does the button 9 do on the Kenwood/Rio. It is labeled as "title" on the Rio. What does "title" mean in relation to what the button does?




Isn't it just another tweak-order function? Find another song with the same title (or if held, "Hate title")?
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#44040 - 29/10/2001 07:04 Re: Javascript image popups? [Re: tms13]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
One suggestion: make the image an image-map, with links to the descriptions of each button. Have the button name be the ALT of the AREA (may be useful for graphical as well as non-graphical browsers), and the full labelling as TITLE.

I had thought about doing an image-map, but I didn't have any good tools for creating the map and defining the regions. Also, I didn't know what to do with the links other than do message-boxes with OK buttons (yuck).

It wasn't until just now that I realized I could have created a separate frame and made the TARGET of the HREFs be the frame. That would have been dead simple. Now it's too late and I've got a much more snazzy implementation based on the DVDWorld code.
_________________________
Tony Fabris

Top
#44041 - 29/10/2001 07:04 Re: Javascript image popups? [Re: tms13]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Isn't it just another tweak-order function? Find another song with the same title (or if held, "Hate title")?

Didn't do anything when I tried. Anyone else?
_________________________
Tony Fabris

Top
#44042 - 29/10/2001 07:11 Re: Javascript image popups? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
I'm still working on it, but if you want to look at the page in progress, you should be able to see it here.

I did end up slicing the images, once I found a free downloadable image slicer that worked well.

I'd be very interested in knowing how it performs on other browsers. I have only tested it on IE5.5 and Netscape 4.7 at this time. What about Netscape 6 and IE 4? Anyone?
_________________________
Tony Fabris

Top
#44043 - 29/10/2001 07:12 Re: Javascript image popups? [Re: tfabris]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
In reply to:

Isn't it just another tweak-order function? Find another song with the same title (or if held, "Hate title")?

Didn't do anything when I tried. Anyone else?




You're right

And yes, I tried it with a song called Money (4 different, by Pink Floyd, Space, and the Flying Lizards), so it should have found another match later in the playlist.
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#44044 - 29/10/2001 08:02 Re: Javascript image popups? [Re: tms13]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Ah, just chatted with Roger. This button actually doesn't do anything yet. It might in a future release.
_________________________
Tony Fabris

Top
#44045 - 29/10/2001 11:09 Re: Javascript image popups? [Re: tfabris]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Doesn't seem to work in Opera 5 and not in Netscape 6.1 either. Opera 5 reports parsing errors in script (no details though), Netscape 6.1 doesn't seem to do anything at all.
I double checked that I have javascript enabled in both browsers.

As you already ended up slicing the images, please set the ALT- and TITLE-texts as proposed in this thread. You could still use the javascript approach for the IE5 users (though I donīt like the fact that the info immediately pops up).

Also, I generally disable JScript (which includes JavaScript or vice versa) in IE.

cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#44046 - 29/10/2001 11:20 Re: Javascript image popups? [Re: smu]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
The problem with setting the ALT tag is that it gets in the way of the cool Javascript window.

I wonder how to make it work in Opera and Netscape 6. If anyone knows anything about Javascript, take a look at the stolen code (contained in http://www.riocar.org/upload/faqpics/remote_mouseover_library.htm ) and see if it can be fixed? Maybe it's something simple.
_________________________
Tony Fabris

Top
#44047 - 29/10/2001 12:15 Re: Javascript image popups? [Re: tfabris]
loren
carpal tunnel

Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
One request... it's looking great so far... but could you scan them at a higher res? It'd be nice to be able to actually read what's on the remotes. As it stands it's very difficult/impossible to make out some of the text on the graphics. =]
_________________________
|| loren ||

Top
#44048 - 29/10/2001 12:24 Re: Javascript image popups? [Re: loren]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Not going to happen.

My goal was to make the images take up very little screen-real-estate, not to make the buttons readable. People with small screens or who run their browsers in a small window might want to look at it.

Besides, now that I've created the tables and sliced the graphics, it would be a royal pain in the arse to do it over again. You can still see the button names when you hover over them.

If I ever change the layout of the page, it's going to be to add front-panel pictures.
_________________________
Tony Fabris

Top
#44049 - 29/10/2001 15:13 Re: Javascript image popups? [Re: tfabris]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
I know you already have something working, but you may also want to look at overlib which does basically the same thing and appears to be a little more tolerant of non-mainstream browsers.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#44050 - 29/10/2001 15:20 Re: Javascript image popups? [Re: mcomb]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Holy crap. That's the exact library that DVDWorld is using. That's the library I just stole.

I didn't realize it was a licensed piece of software. I'm going to have to look at their licensing agreement and see what it involves. I might have to take it down.

Thanks for bringing it to my attention.

_________________________
Tony Fabris

Top
#44051 - 29/10/2001 15:25 Re: Javascript image popups? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Ah, OK, looks like it's freely available from the license agreement. I should just fix up some comments in the code and see if his latest version is any more browser-tolerant. Cool!
_________________________
Tony Fabris

Top
#44052 - 29/10/2001 15:27 Re: Javascript image popups? [Re: tfabris]
synergy
enthusiast

Registered: 20/02/2001
Posts: 345

Holy crap. That's the exact library that DVDWorld is using. That's the library I just stole.


Looking at the licence, it's the artistic, so you should be ok... I'd put a link just to be nice, but you shouldn't have to worry about taking it down...
_________________________
Synergy [orange]mk2, 42G: [blue] mk2a, 10G[/blue][/green] I tried Patience, but it took too long.

Top
#44053 - 29/10/2001 15:59 Re: Javascript image popups? [Re: synergy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
Yeah, it looks like he's got better support in the newer version. He still doesn't support Opera, but he's supposedly fixed the Netscape support, so we can try that out. I'll be uploading the fixed version shortly, complete with an ad-link back to his site. Good stuff.

THANK YOU for pointing that out to me, I'm glad I can link the original author.
_________________________
Tony Fabris

Top
Page 1 of 2 1 2 >