Link In Javascript Alert
I want to put a link in a Javascript alert. Is this possible? (I've searching for a solution, but I keep getting things about links that fire alerts!)
Solution 1:
AFAIK you can't do that with a normal javascript alert box.
Make a custom alert box and then make a link inside it.
Here is a nice one
Also a jQuery based one
Solution 2:
Nope. Only standard OS dialog boxes are available (alert, input, etc.), and none support embedded hyperlinks.
You can could a pop-up window that is styled to look like a dialog, but pop-up windows are likely to have various user blocks, etc. in place.
My advice is to use a an absolutely-positioned DIV with a high z-order centered on your page that looks like a dialog box and put whatever you want in it. Various UI toolkits like JQuery UI take the pain out of this.
Post a Comment for "Link In Javascript Alert"