Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening popup windows in HTML

Tags:

html

I am working with web apps, and I am wondering if there is a way to open a link in an app-type window using HTML? Something like this:

<a href="link" target="_app">My App</a>
like image 847
Arlen Beiler Avatar asked Sep 05 '25 11:09

Arlen Beiler


2 Answers

Something like this?

<a href="#" onClick="MyWindow=window.open('http://www.google.com','MyWindow','width=600,height=300'); return false;">Click Here</a>
like image 138
amitchhajer Avatar answered Sep 08 '25 16:09

amitchhajer


HTML alone does not support this. You need to use some JS.

And also consider nowadays people use popup blocker in browsers.

<a href="javascript:window.open('document.aspx','mypopuptitle','width=600,height=400')">open popup</a>
like image 31
Pradeep Kumar Avatar answered Sep 08 '25 16:09

Pradeep Kumar