Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I replace Window.Open with Window.Location?

Status
Not open for further replies.

Curtis360it

IS-IT--Management
Nov 7, 2005
88
US
This currently is located in one html doc and is triggered at the OnLoad event. Is there anyway to make this load in the same browser window?

<script type="text/javascript">
function openWebRepairWindow() {
var win = window.open("/web_repair/fwc_ocrepair.php?rslvr_subclass=*", "fwc_ocrepair_win", "status=1,scrollbars=1");
if (win) {
win.moveTo(0,0);
win.resizeTo(screen.width, screen.availHeight);
}
}
</script>
 
Yes, you can use window.location (although how hard would it have been for you to try this yourself - really?).
Code:
<script type="text/javascript">
function openWebRepairWindow() {
  window.location("/web_repair/fwc_ocrepair.php?rslvr_subclass=*");
}
</script>

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
[tt]function openWebRepairWindow() {
window.location.href="/web_repair/fwc_ocrepair.php?rslvr_subclass=*";
window.moveTo(0,0);
window.resizeTo(screen.width, screen.availHeight);
}[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top