var pop = window.open("", "p0pup",....blahblah......);
Basically it is a popup script. My question is that is there any way to reference to an external html using document.writeln? Instead of messy html codes within document.writeln, maybe something like this?
var pop = window.open("popup.html", "p0pup",....blahblah......);
<input type="submit" value="submit" onClick="popup('url','title')"/>
where popup.html lives in the same directory as in index.html
However, all it pops up is a blank page...any idea why? (and...popup.html is not blank)
Last edited by MrAtheist; 05-08-2009 at 07:29 PM..
Not sure about title... meaning not sure what you want to do with the title itself. Are we talking about calling the new window something, or do you want to alter the <title> element in the new window itself? Because I'm not sure if that can be done... url can be passed easily though... and I guess if you want to name the window itself something, you'd be doing it like so:
var pop = window.open(url, title,....blahblah......);
Make sure you pass url and title as strings when calling the function. I.e:
See how that goes for you.
The way to success is to assume that there are no impossible things. After all, if you think something is impossible, you will not even try to do it.