Pop up hints or messages

Discussion in 'JavaScript' started by sugarland, Aug 2, 2009.

  1. #1
    I saw many websites, when loaded, it will pop up a small window showing some announcements. But looks like it's not achieved by window.open() function, since it's just a small area with fine borders (maybe 1 px), and on top right, just one button to close the window. How to achieve this? Please don't suggest window.open() here.

    Also in some websites, at the top there a menu bar, and when you move mouse to the links, it will pop up some hints, how to do that also?
     
    sugarland, Aug 2, 2009 IP
  2. guyco

    guyco Guest

    Messages:
    273
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,
    you can do this with scripts like javascripts. I suggest your search websites offering them for free if you cannot do it yourself.
     
    guyco, Aug 2, 2009 IP
  3. quirksmode

    quirksmode Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Often this is just a div styled to look like a window. You can use javascript to give it drag and drop properties or to make it 'pop-up' to further mimmick a window...
     
    quirksmode, Aug 3, 2009 IP
  4. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This is known as the "modal box" technique. Here's one for jquery: jquery.com/demo/thickbox/ (there are better out there)
     
    premiumscripts, Aug 4, 2009 IP
  5. 1 FineLine

    1 FineLine Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    jquery is the best option. There are many plugin's available that do this.

    The coolest one uses the jQuery UI and jQuery/. It allows you to resize the window and move it within the browser window. Here's a great example:

    (http:)queryui.com/demos/dialog/

    (I'm not allowed to post links yet but preceed the jqueryui with http)



    PM me if you need something done. :)
     
    1 FineLine, Aug 4, 2009 IP
  6. sugarland

    sugarland Member

    Messages:
    105
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #6
    I understand javascript, but still don't know how to do that? Can anybody give some codes?
     
    sugarland, Aug 4, 2009 IP
  7. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #7
    We already gave you the code, haven't you read the supplied link?
     
    premiumscripts, Aug 4, 2009 IP
  8. 1 FineLine

    1 FineLine Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If you understand JS you should be able to interpret the code in the example I gave. Expecting someone to "Give you the code" defeats the purpose of learning how it works.
     
    1 FineLine, Aug 5, 2009 IP