English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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.

2006-08-09 04:07:54 · 0 answers · asked by dkr 1 in Computers & Internet Programming & Design

0 answers

you don't but you can use a confirm box to do a redirect when the user clicks ok:

2006-08-09 04:44:32 · answer #1 · answered by John J 6 · 0 0

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.

2006-08-09 11:10:50 · answer #2 · answered by boris 5 · 0 0

that's what popups are for.

2006-08-09 11:12:29 · answer #3 · answered by Bruno 3 · 0 0

fedest.com, questions and answers