Have dynamic size using window.open

I must use the window.open to open a url. But I want it to be dynamic(the width) according to the content on the loaded url How can I achive this?

Answers


You can't do that. You can set a start up width though, which you yourself can calculate:

window.open("","","width=200,height=100");

UPDATED

After some thinking there might be a way to "calculate" the content width.

If you load your url in a not visible iframe, you could actually get a value from the iframe content by querying its width.

And if you use ASP/PHP, you could do this server side too, which would save you issues with the iframe.

ASP has the webclient which can be used, PHP I don't know but for sure has something else.


Need Your Help

What skills do you need for proper UI/Interaction/Functional design in Web Apps?

language-agnostic project-management web-applications

When you to develop web applications from scratch, what are the skills needed, to produce usable and interaction-rich products?

Image ID undefined in Firefox

javascript jquery image firefox

The following function to change image source on mouse hover/mouseout works in Chrome:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.