/    Sign up×
Community /Pin to ProfileBookmark

load in same window

this is the code i have. everything functions exactly as i would like it to excep that is pops up in a new window. Can anyone tell me what i need to change to have it just repopulate the same window and not pop-up?

<head>
<script language=”JavaScript1.2″>
function redirectPage(Big,Medium) {
var screen_height = screen.height;
var screen_width = screen.width;
var buffer = (document.all || document.layers ||documentGetElementByID) ? 30 : 48;
if (screen_height >= 768) {
screen_width = 1024;
screen_height = 768;
var window_width = 1024-12;
var window_height = 768-buffer;
var window_top = 0;
var window_left = 0;
window.open(Big,”,’target=self,resizable=no,status=yes,width=’ + window_width + ‘,height=’ + window_height + ‘,top=’ + window_top + ‘,left=’ + window_left + ”);

} else {
screen_width = 800;
screen_height = 600;
var window_width = 800-12;
var window_height = 600-buffer;
var window_top = 0;
var window_left = 0;
window.open(Medium,”,’target=self,resizable=no,status=yes,width=’ + window_width + ‘,height=’ + window_height + ‘,top=’ + window_top + ‘,left=’ + window_left + ”);

}
}
</script>

<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>Untitled Document</title>
<style type=”text/css”>
<!–
body {
background-color: #0033FF;
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF;
font-size: 50px;
}
–>
</style></head>

<body onLoad=”redirectPage(‘1024×768.html’,’800×600.html’)”>
<span class=”style1″>DAY</span>
</body>
</html>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisDec 27.2007 — target=self[/quote]This is not a window feature. You might gain some insight by reading about window.open() at http://msdn2.microsoft.com/en-us/library/ms536651(VS.85).aspx. You will find that the second string parameter in the command is the window name/target and that you can specify the current window using the reserved word "_self".
Copy linkTweet thisAlerts:
@Brody_zenauthorDec 27.2007 — yes the target=self is somthing i threw in to see if it would work and i forgot to take it back out before i posted it. I think the issue is with the window.open command. I am hoping the is an alternate code i can place here to open it in the same window. Any idea.
Copy linkTweet thisAlerts:
@nap0leonDec 27.2007 — have you tried using

window.location.href instead of window.open?
Copy linkTweet thisAlerts:
@Brody_zenauthorDec 27.2007 — i amended it this way and it now works fine.

window.open(Big,'_parent','resizable=no,status=yes,width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');




thatnk for your help guys.
×

Success!

Help @Brody_zen spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...