Home » questions » how do I insert link in a javascript alert message.?

how do I insert link in a javascript alert message.?

2006-08-09 08:07:54, Category: Programming & Design
How do I embed a link in a javascript alert message? For example, if I have something like alert("click here for more info"); and 'here' is a http link. Thanks.

Answers

  1. Bruno

    On 2006-08-09 08:12:29


    that's what popups are for.
  2. boris

    On 2006-08-09 08:10:50


    You can't. The only way would be to use a window.open to create a new browser window, and put the link there. However this would be blocked by many popup blockers.
  3. John J

    On 2006-08-09 08:44:32


    you don't but you can use a confirm box to do a redirect when the user clicks ok: <script language="JavaScript" type="text/javascript"> if(confirm("Click Yes")){document.location="newUrl.html";} </script>