SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict matt_12511's Avatar
    Join Date
    Feb 2004
    Location
    Michigan
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Alert Message Javascript

    I copied some code I found online yesterday to create an alternate alert window. But for some reason the window doesn't pop up in the middle of my screen. Instead it appears underneath my footer.

    If you go to:

    http://www.utakeitback.org/411/Brief...ndobabble.html

    Do NOT click "I accept the terms and conditions" and click "Continue". Then you will notice that the popup alert message appears below the footer. It should appear like the example on the page I got the code from:

    http://slayeroffice.com/code/custom_alert/

    Any ideas?

    Thanks,

    Matt

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well, that's because there's no CSS applied to it. You need to give it a width and position:fixed (there is probably a fix to emulate that for IE6 in the javascript) and position it in the middle of the page. Look at the CSS in the page you got that from and you'll see how it's positioned there.

  3. #3
    SitePoint Addict matt_12511's Avatar
    Join Date
    Feb 2004
    Location
    Michigan
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep! that was the problem. I guess I didn't realize I needed to copy his CSS as well.

    For future reference...I really like his alternative to the window.alert

    Thanks,

    Matt


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
  •