View Full Version : Graphical captions over HTML elements
waolly
02-04-2005, 05:01 PM
Hey Fellas,
I got this javascript widget finished the other day.
It's called BoxOver and allows floating captions over HTML elements, similar to overlib but uses less CPU and is much smaller (<10kb).
Would be super keen to hear any comments/criticisms on it. Also if anyone has any ideas for changes that would be cool too.
I thought it would be quite messy to just paste all the code here so probably easier if you go check it out here (http://boxover.swazz.org)
joh6nn
02-04-2005, 09:39 PM
not too bad. it's better than some implementations i've seen, in that if the JS gets lost or dissociated (say during a download, or something), then the information that's in the tool-tip remains directly connected to it's parent, which is nice.
i think that there's a LITTLE room for improvement in the code, but not much. take a look at this, for example: http://www.codingforums.com/showthread.php?t=47379
redoc
02-04-2005, 10:10 PM
Looks great to me... if I get some time soon (who knows if that would happen) I would love to implement this into a calendar script I have on one of my pages. Assuming I can fill the captions from a database using PHP, then when you mouseover a given day, it will popup and tell you all events for that day. Could be very handy.
waolly
02-04-2005, 11:27 PM
Shot for the fast responses guys, much appreciated.
That thread on event binding using square bracket notation is extremely cunning. I'll update the JS source to use that method as soon as I have a bit of time.
I must say I'm really stoked with this forum, been browsing around reading and posting in threads for hours :)
_Aerospace_Eng_
02-05-2005, 12:26 AM
maybe u can add the opacity feature for FF also?
Sayonara
02-05-2005, 12:31 AM
Very nice indeed.
I am working on a site right now, and may well use that. All outside sources of code are being credited, so you'll benefit from a link back ;)
waolly
02-05-2005, 07:04 PM
maybe u can add the opacity feature for FF also?
Good idea, Done ;)
Weirdly enough I use Firefox, was just using IE when I initially started coding this project and I obviously forgot to sort it out in Firefox....oops.
And off the topic what do you think of Firefox? I reckon it has to be the most superior browser by leaps and bounds.
Scootertaj
02-06-2005, 03:03 AM
I was looking at the example (http://boxover.swazz.org/example.html).
Just an idea but mabye put more box overs under the Mammal, chicken, insect, poultry??
_Aerospace_Eng_
02-06-2005, 04:10 AM
yes FF is semantic when it comes to how it views coding but I still enjoy IE but i do like the built in security features of FF, i dunno it seems im using both IE and FF the same amount
waolly
02-11-2005, 02:26 PM
I was looking at the example (http://boxover.swazz.org/example.html).
Just an idea but mabye put more box overs under the Mammal, chicken, insect, poultry??
Thanks the for the input, do you mean more rows in the table (with chicken, poultry, etc) or more sections where BoxOver could be used? (i.e. apart from image maps and tables)
aspushkin
02-17-2005, 01:57 AM
Is there way to use iframe instead of divs to fix IE problem where if you
have "select"
<select name="testSelect" id="testSelect">
<option>foo</option>
<option>bar</option>
</select>
then IE places it over everything else.
Regards
Alex.
waolly
02-17-2005, 01:53 PM
I must admit that is one hellofa annoying problem in IE - so are you saying that instead of using a div, I should use an iframe for the caption?
aspushkin
02-17-2005, 04:18 PM
Basically, yes.
There are problems with iframe - you can't set your page to strict xhtml, but it's still valid for transitional. And if you create your iframe on the fly with JS then you can get away with scrict xhtml.
Here couple articles on this topic:
http://dotnetjunkies.com/WebLog/jking/archive/2003/07/21/488.aspx
http://dotnetjunkies.com/WebLog/jking/archive/2003/10/30/2975.aspx
Regards,
Alex.
aspushkin
02-17-2005, 07:15 PM
here is another link on IFRAME from MS
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q177/3/78.asp&NoWebContent=1
aspushkin
02-17-2005, 08:57 PM
OK, so far this is the best solution out there, check it out...
http://www.aplus.co.yu/wch/intro/
It's distributed under CCL.
royall
03-26-2005, 02:54 AM
How would I be able to put an image in the body of the caption? Am I even able to?
_Aerospace_Eng_
03-26-2005, 03:15 AM
like this one (http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm)?
royall
03-26-2005, 04:00 AM
Well I was thinking to stick to waolly's script, but that works too.
P.S. And if you are wondering why I am here now, this is the first thing I came upon when searching for an alternate for HTMLForums...those people dont even let you have links in your signature...Peg is way too strict about the rules.... :mad:
waolly
03-26-2005, 02:53 PM
Hi Royall,
If you follow the link below one of the examples contains an image in the caption (either move over "this" on the bottom right or the "?" at the top left)
http://boxover.swazz.org/example.html
royall
03-26-2005, 03:46 PM
Hi Royall,
If you follow the link below one of the examples contains an image in the caption (either move over "this" on the bottom right or the "?" at the top left)
http://boxover.swazz.org/example.html
Wow, thats cool! I didn't think I could do that because on the chart it says "Any character"
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.