Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have application with angular where I have an input:
<pre lang="HTML"> <p> <a href="redirect()" target="_blank">Open documentation</a></p>

Open documentation
which calls method:

JavaScript
redirect() {
window.open(this.documentationUrl, '_blank');}


What I have tried:

this.documentationUrl holds the link of documentation (let's say docs.com) site and is made with Mkdocs. On click, alert pops up asking for Username and Password. Is it possible to fill that alert which pops up? And which side it should be done on angular or Mkdocs? I know it should be possible but I have no idea how and where to begin.
Posted
Updated 31-Oct-18 0:27am

1 solution

Browsers don't let you manipulate pages that have been served via different domains for security reasons (think about it...would you want a website accessing username and password boxes on any other site you might have open?). There is a way around this but it involves the target site (docs.com) being modified to allow your site to script it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900