Results 1 to 3 of 3

Thread: Hyperlink and Mailto within JavaScript alert box?

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

    Question Hyperlink and Mailto within JavaScript alert box?

    Hi,

    I'm sure there's a way to accomplish this...without continually beating my head against my keyboard.

    Hopefully someone can point me in the right direction.

    How do I add a hyperlink within a JavaScript alert box?
    And how would I add a mailto link within a JavaScript alert box?

    Thanks,
    SnicoleK







    PUPKUS (pup' kus) n. The moist residue left on a window after a dog presses its nose to it.

  2. #2
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Workaround for a Hyperlink and Mailto within JavaScript alert box

    Thank you very much to jscheuer1 for this response:

    "You cannot do that, alerts are for text only, you cannot even control the font used. Here is a link to a DD script that will allow you to generate a drop down box that can have your link on it:"

    http://dynamicdrive.com/dynamicindex17/dropinbox.htm


    Regards,
    SnicoleK

  3. #3
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile possible solution

    There is a way that can ask a series of questions and then send you to a mailto or hyperlink.

    Here are four separate buttons. Click here for a live example.
    HTML Code:
    <html>
    <body>
    <input type="button" onClick='alert("Goodbye."); window.location = "http://www.google.co.uk/"' value="Google">
    <input type="button" onClick='alert("Mail me?"); window.location = "mailto:thomas.tillotson@floodge.com"' value="E-Mail">
    <input type="button" onClick='if (confirm("Do you want to go to google?")){window.location = "http://www.google.co.uk/"}else{}' value="Ask Google">
    <input type="button" onClick='if (confirm("Do you want to email me?")){window.location = "mailto:thomas.tillotson@floodge.com"}else{}' value="Ask Mail">
    <input type="button" onClick='number2(); function number2() {if (confirm("Mail me")){alert("thomas.tillotson@floodge.com"); window.location = "mailto:thomas.tillotson@floodge.com"}else{if (confirm("go to google")){alert ("to google with you"); window.location = "http://www.google.co.uk/"}else{if (confirm("repeat choices")){number2()}else{alert ("ok then")}}}}' value="Click Here">
    </body>
    </html>
    Last edited by thomas_is_here; 06-15-2008 at 12:42 PM.

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
  •