goddess Posted January 11, 2008 Share Posted January 11, 2008 I want to put a link on an alert button. <html><head><script type="text/javascript">function disp_alert(){alert("I am an alert box!!");}</script></head><body><input type="button" onclick="disp_alert()" value="Display alert box" /></body></html>Where value reads "would you like to continue..." and alert reads "click ok to continue" to its' link.Please help.Thanks Diane Milinowski Link to comment Share on other sites More sharing options...
justsomeguy Posted January 12, 2008 Share Posted January 12, 2008 You can't put a link inside of an alert box, an alert box just displays some text and has an OK button. You can have a confirm box that shows text and has OK and Cancel buttons, or a prompt box where someone can type something in. You can't put HTML code into the alert text though, it will just display as HTML code. Link to comment Share on other sites More sharing options...
Synook Posted January 13, 2008 Share Posted January 13, 2008 I think he means make the ok button redirect to a page, i.e. <html><head><script type="text/javascript">function disp_alert(){if (confirm("click ok to continue")) window.location = "link.html";}</script></head><body><input type="button" onclick="disp_alert()" value="would you like to continue?" /></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.