code_junkie

How do I put a link to a webpage in a JScript Alert dialog box?

Nov 10th, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. There was an error. Go to this page to fix it.
  2. wwww.TheWebPageToFix.com
  3.  
  4. if(window.prompt('Do you wish to visit the following website?','http://www.google.ca'))
  5. location.href='http://www.google.ca/';
  6.  
  7. if (window.showModalDialog)
  8. window.showModalDialog("mypage.html","popup","dialogWidth:255px;dialogHeight:250px");
  9. else
  10. window.open("mypage.html","name","height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes");
  11.  
  12. alert("There was an error. Got to this page to fix it.nwww.TheWebPageToFix.com");
Add Comment
Please, Sign In to add comment