Changing port with javascript window.location
<p>Currently a page i am editing has a JS menu. This contains items such as;</p>

<pre><code>{
    xtype: 'tbbutton',
    text: 'Home',
    width: 60,
    handler: function() { window.location = 'index.php'; }
},
</code></pre>

<p>However due to how the server is set up i need to change port number between pages, as some are unable to handle the php used on the pages. (Trying to base on someone elses program to fit my purpose)</p>

<p>From what I have seen on here it suggests this should work</p>

<pre><code>{
    xtype: 'tbbutton',
    text: 'Home',
    width: 60,
    handler: function() { window.location.port = 80; window.location = 'index.php'; }
},
</code></pre>

<p>So result i am aiming for in index.php would be on port 80 and page1.html, page2.html on port 81. User being able to jump between them with a click regardless of port. The page could be accessed on home network (with a 192. address) or Via web (with public IP) so I would prefer not to have to set the domain each time. </p>

<p>Any ideas?</p>