Debt Consolidation - Kamala - Credit Cards - Free Movies - Bollywood India forum movie reviews

PDA

View Full Version : Open link in new window


JWRmedia
Oct 28th 2008, 5:50 pm
Sounds easy enough. Only I cant get it to work with the following code inside a .js file:

var bottomToolbar = [];
bottomToolbar.push({
text: FR.T('Help'),
handler:function(){
document.location.href = 'http://example.com/help.html';
},
icon: FR.baseURL+'/images/page_white_go.gif',
cls: 'x-btn-text-icon'
});

Does anyone know how I can modify this to make example.com/help.html open in a new window when the button is clicked? Right now it opens in the same window.

Thanks

MediaPlay
Oct 28th 2008, 6:02 pm
window.open='http://example.com/example.html'
Try this one ..:rolleyes:

JWRmedia
Oct 28th 2008, 6:08 pm
window.open='http://example.com/example.html'
Try this one ..:rolleyes:

yeah, unfortunately I tried that one and nothing happens when you click the button. :(

MediaPlay
Oct 28th 2008, 6:52 pm
<script type="text/javascript">
function OpenWindow() {
windowHandle = window.open('http://www.google.com','Google','width=500,height=500,location=yes'); windowHandle.focus(); }
</script>

<form>
<input type="button" value="Open Window" onClick="OpenWindow()">
</form>
Instead of using document.location, add a function witch will open a new window :p

rhoula
Oct 28th 2008, 9:09 pm
I already made the script for you.
If you want to make a small donation please feel Free. :D
Thank you