Advanced Search

Results 1 to 4 of 4

Thread: Looking for a script in DHTML

  1. #1
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking for a script in DHTML

    hey everyone, new guy here, i've seen this script everywhere and can't seem to find it anywhere. It's a window that will float out from the right side usually in about a 400x400 box and on the top and bottom or just the top allow you to click to close.

    The window will float out above your content when a user enters the page but doesn't seem to show up everytime, i'm assuming it may have some type of display setting to it.

    Anyone have any ideas?
    Thanks in advance,
    Bill

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    http://www.dynamicdrive.com/dynamici...htmlwindow.htm
    or something else from http://www.dynamicdrive.com/dynamicindex8/ can probably work for your needs with some adjustments.

    As for remembering to only show it once, that's likely done by a cookie. The only two ways that are really possible are to track IP address and cookie. IP would be done on the server with a database, and probably a bit more work than you'd want for this, as well as not working great, since IPs change infrequently (frequently for dialup users, though), and this would cause some users to possibly not get the popup if they currently have an IP that has already been to your site.
    Using a cookie would work fine, but requires that the browser support cookies. The good news is that anything that supports javascript will support cookies, assuming it isn't turned off as a security measure.
    The other downside to cookies is that they are cleared when the browser cash is cleared, so it will have no cookie every once in a while. Hopefully, though, you're "important announcement" or whatever, would rotate somewhat often, or something, so that would even make sense. Or they'd just see it every few weeks or something, which is probably fine too.
    Not sure on the details of using a cookie in javascript, though, sorry. I know they are accessible with document.cookie, at least in some ways, and there is, I think a function to set them, setCookie(), but that is also in PHP, so I might just be mixing that up.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you

  4. #4
    Join Date
    Dec 2006
    Location
    Raleigh, NC
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Nice script djr33. I dig it.

    You might also want to look at Lightbox, its a very easy solution and might be what you mean.

    Here is a simple explanation on using cookies in JavaScript. I prefer to use PHP, but JS might be simpler if you don't know about either. If you would like help with the PHP aspect, I can provide said help.

    I would set the cookie to expire in 24 hours.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •