<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to start javascript from command prompt with window object loaded ?]]></title><description><![CDATA[<p dir="auto">I'm writing a program that needs to start opera, load a page and run some javascript.<br />
I've been able to run multiple statements as follows:</p>
<p dir="auto">launcher.exe "javascript:alert('hello')"; etc.</p>
<p dir="auto">The problem is that if I enter something like this</p>
<p dir="auto">launcher.exe <a href="http://www.yahoo.com" target="_blank" rel="noopener noreferrer nofollow ugc">www.yahoo.com</a> "javascript:alert('hello');"</p>
<p dir="auto">it will open <a href="http://yahoo.com" target="_blank" rel="noopener noreferrer nofollow ugc">yahoo.com</a> in one window, and run the javascript in a new, empty window!<br />
To solve this, I'm trying to load the page with the javascript command</p>
<p dir="auto">window.open("<a href="http://www.yahoo.com" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.yahoo.com</a>","_self")</p>
<p dir="auto">However, the problem is that the empty page it opens to run the javascript DOES NOT SEEM TO CONTAIN THE WINDOW OBJECT!!<br />
Help please,<br />
Thanks</p>
]]></description><link>https://forums.opera.com/topic/10461/how-to-start-javascript-from-command-prompt-with-window-object-loaded</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 14:35:08 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/10461.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jun 2015 16:59:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to start javascript from command prompt with window object loaded ? on Fri, 19 Jun 2015 21:51:35 GMT]]></title><description><![CDATA[<p dir="auto">Sorry my mistake, it actually works with location= . How can I delete this post ?</p>
]]></description><link>https://forums.opera.com/post/78297</link><guid isPermaLink="true">https://forums.opera.com/post/78297</guid><dc:creator><![CDATA[zane2233]]></dc:creator><pubDate>Fri, 19 Jun 2015 21:51:35 GMT</pubDate></item></channel></rss>