Pop-up text box

Discussion in 'HTML & Website Design' started by Inersha, Mar 20, 2008.

  1. #1
    Hey Guys,

    I'm looking to have a small text box pop up whenever you click on a small image. The image is a question mark, and I would like a text box to appear when you click on it, giving a brief description of something. You can see it here at www.newpokeraffiliate.com, in that main box on the left side.

    At the moment I am just using alt tags, but this is only a quick solution, and doesnt work well in firefox as it does not appear when you hover.

    What is the simplest and most effective solution?

    Thanks in advance.
     
    Inersha, Mar 20, 2008 IP
  2. Inersha

    Inersha Active Member

    Messages:
    182
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    Any ideas?
     
    Inersha, Mar 21, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Stomme poes, Mar 21, 2008 IP
  4. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Or, of course, you can use one of my favourites: mootools Tips.

    Enjoy!
     
    Marc Fraser, Mar 21, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Which is fine, so long as it's not an important tooltip. I can't see the tooltips on that site without first turning Javascript on. Luckily, I can. People behind public computers like in offices, schools, and libraries are often behind firewalls that can block (some) javascript. Since the browsers might still actually be Javascript enabled, <noscript> doesn't trigger. If this tooltip is for forms or other more important things, then you need to keep this in mind.

    Javascript like Mootools is the only way though (cross-browser) to get the tooltips to appear on click though. If you need them to show on click and stay there until the user clicks somewhere else, then the Javascript might be more worthwhile. You can fake this with CSS but not every browser keeps focus, so it's not cross-browser friendly. For hover, though, I say CSS!
     
    Stomme poes, Mar 21, 2008 IP
  6. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Mate, unless the schools, offices, etc.. around you are back in the stone ages, i feel you have nothing to worry about.

    Every public facility (that has coomputers) in this country, and every office that I've been in has had Javascipt enabled.
     
    Marc Fraser, Mar 21, 2008 IP
  7. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ^ enabled as far as scripts deemed "safe". Sometimes firewalls are set so "unfamiliar" scripts are blocked, while others are allowed through. Since I'll never know when someone's got a Javascript-enabled browser, has NoScript running, or working via a corporate firewall blocking some or all of scripts, I never, EVER trust Javascript to do a man's job. I'll let it enhance an already-working site, but never trust it to reach everyone's browsers. If the JS is supposed to make something jump and sparkle, it doesn't matter. But if it's bringing necessary content to the site, then it matters. Sometimes, JS is the only solution, so you make a little note on your page stating that it needs Javascript to work fully. Unfortunatley, a lot of people take this as a way to use JS for all sorts of strange things. On most of the house/real-estate sites I visited when house-hunting, I could not even click a simple link to see a photo without scripts enabled. That's sad.

    That said, at least the MooTools site has the tooltip text in the HTML which is good.
     
    Stomme poes, Mar 22, 2008 IP
  8. Sonikk

    Sonikk Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Id say css over javascript..
     
    Sonikk, Mar 22, 2008 IP
  9. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't think anyone's disputing that.. I too love CSS, and would choose CSS any day of the week; although in saying this, I love this mootool. ;)
     
    Marc Fraser, Mar 23, 2008 IP
  10. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yeah, and like I said, if the OP wants this to show on click, CSS can't do that (cross-browser)... mootools seems pretty popular. JS issues aside, there's no reason not to try it. : )
     
    Stomme poes, Mar 23, 2008 IP
  11. Inersha

    Inersha Active Member

    Messages:
    182
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #11
    Really like the mootool, looks perfect.

    The CSS pop-up was originally what I was looking for, but the mootool is pretty sweet.
     
    Inersha, Mar 24, 2008 IP
  12. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Sorry, but Marc is correct, unless you live in the stone ages, you're completely wrong.

    There's no need to have software firewalls, if you know how to set up a network properly, there's no need for a software firewall whatsoever. Which, correct me if I'm wrong - most libraries, offices and public buildings will have somebody running the network efficiently and will know a firewall isn't needed.

    However, I still suggest using Javascript. The only person that ever turns it OFF are webmasters, trying to be 'cool', like those that boast that they use Linux. Wow, look at that, nobody cares:D
     
    Spider-Man, Mar 24, 2008 IP
    Marc Fraser likes this.
  13. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #13
    ^ my office isn't in the stone age at all. We have a firewall. Whether it's actually needed or not, I'm not a network person, but I do know people (and businesses) use them. I will not take the chance that parts of my site will be inaccessible to someone. People who turn it off, I don't worry about. They have the choice to turn it back on. Javascript should enhance an already working site, not be required for a site to run.

    It's sounds like someone saying people on dial-up are in the stone age.
     
    Stomme poes, Mar 24, 2008 IP
  14. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Was that rhetoric or a statement? I'm going with the latter;)
     
    Spider-Man, Mar 25, 2008 IP
  15. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Stomme poes, Mar 25, 2008 IP
  16. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    That's probubly because the BBC is the most farce of an organisation to grace this planet. They concentrate on problems that arent problems, and probubly wasted about £5,000,000 creating that page - for some useless information that 99.5% of the public aren't going to read, dont intend on reading and dont need to read - purely because, as Spider-Man said, the majority of people aren't in the stone ages.
     
    Marc Fraser, Mar 25, 2008 IP
  17. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Well, a lot of people here know I have backlinks from the BBC's sites, yet even I didn't know they had pages about investigating the standards of Javascript. Nice find, nonetheless;)
     
    Spider-Man, Mar 25, 2008 IP
  18. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I thought it was maybe because of the UK's accessibility laws, which I know are stricter than the US's (which only apply to government sites or non-profits who get money from taxpayers). My best guess.

    Best I could find for internet research was that the number of those surfing without JS on is between 4 and 10%, mostly around 4 though, seems to depend on the month of the year. I lump these people (unless they can turn scripts on) with those with 800x600 monitors, colour-blindness, monochrome screens, PDA's/cellphones/Blackberries, IE5.5, disability like limited or no sight or inability to use a mouse... they may all be small in number, but 4% of a million paying customers is not insignificant for a company like mine. I do have to draw a line somewhere (I couldn't even get a copy of Nutscrape Navigator 4 anyway), but my pages need to be as accessible as possible, and degrade gracefully when all their features don't work. I use Javascript to give IE6 a fixed footer and min-max width on some of my pages-- but there's a width set for those without JS, and a position for the footer too.

    And whether people should or should not be using Firewalls in such a way as to block scripts, I can't stop people from doing it, and I want them to buy my company's products and read our information nonetheless (just like I'd love for everyone to get rid of IE6 and move up to something better so I can stop hacking for it-- but people blame the website, never the browser).
    We just had someone contact us about another of our old sites, using Safari and saying some stuff didn't work (not a page I've gotten to re-writing yet). Yup, somehow they turned Javascript off and even thought Macs didn't support it! So we sent an email telling them how to enable JS in Safari (insert eye roll here). When I get to that site, the visitor will never notice either way.
    One old site of ours had whole popups of information hidden with Javascript (clicking on a quesiton mark made them appear). On several pages that was the majority of our actual content, meaning teh googlies never saw it (and my boss is Google crazy). That content had our key words and phrases, and hid the content from those who could not get the click to work. Never showed up on search. And why?

    In any case, we are all free to block anyone we think is in the stone age or whatever, but if it's no extra work for me to include them, then I do.

    I run No-script for testing-- what's cool about 50% of the sites out there not working on your machine?? My sites had better work no matter what I'm blocking, or else I'd better back away from the keyboard and take up basket weaving or something, as deathshadow would say. If I can't write a working site without reaching for a crutch, I shouldn't be writing them at all.
     
    Stomme poes, Mar 26, 2008 IP
  19. HDaddy

    HDaddy Active Member

    Messages:
    287
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #19
    I agree with Stomme, allthough i sometimes use js popups.

    Here´s one that i´ve used. http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/ You don´t have to use images, just text like here i´ve used. http://www.ykspihlajantyovaennayttamo.net/galleria.html , just hover over a pic.
     
    HDaddy, Mar 26, 2008 IP