Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Alert!!!

  1. #1
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Alert!!!

    Code:
    <script type="text/javascript">
    alert("What do you want!?");
    </script>
    is the text for an alert box to pop-up when a user loads a page.
    My question:
    Is there a way to animate the pop-up? Colors? Pictures? Anything? I have tries HTML, and come up with only stupid things. Any ideas???
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can't do anything to an alert - it pops up, the user clicks OK, it goes away again. If you want to add eye-candy, you'll have to use a seperate window, or perhaps a pseudo-popup in a div.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    pseudo-popup in a div
    What is that? How do I do that?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You have a floating div, then you use images to give it a titlebar and buttons so it looks a bit like a popup. Tends to only work well on Windows users, but others will get the idea.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hm.......sounds interesting. so basically
    onload
    open popup.html target="_blank"
    ?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, that would be an actual popup.
    http://www.mattkruse.com/javascript/...ow/source.html includes code to do this.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    whoa it's long!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I don't need anything that "complex" or that "long" I'll just go with
    <body>
    Code:
    <script type="text/javascript">
    onload()
    document.open "alert.html" target="_blank"
    </script>
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    (shrug)
    I suggest you use:
    Code:
    <script type="text/javascript">
    window.open("alert.html");
    </script>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    will it auto-open on load?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yep. The code is executed exactly as it is, when the browser sees it. You seem to have this thing about document.open. It does not redirect the browser. Also, you must include parentheses around the arguments to a function. This isn't Visual Basic.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •