/    Sign up×
Community /Pin to ProfileBookmark

Open page in a new window and redirect current window

Hey all,

I have a little bit of JS on a page that isn’t working, and I cannot figure out why. If any body can spot where I am going wrong I’d very much appricitate it. The ASP poriton works fine, its just the script doesn’t run. What I am trying to achive is to open one page in a new window ([url]http://dynedrewnett/asp/chatroom/enter_chat_room.asp[/url]) and then go back to the homepage in the original window ([url]http://dynedrewnett[/url]).

Thanks.

[CODE]<%
IF len(Request.Cookies(“Nick”)) = 0 THEN ‘ Only populates the cookie if it is empty
Response.Cookies(“Nick”) = str_displayname
END IF
Response.Cookies(“Nick”).Expires = CDate(CStr(Date()) & ” 23:59:59″) ‘ Cookie expire at the end of the day
IF Request.Cookies(“Destination”) = “http://dynedrewnett/asp/chatroom/enter_chat.asp” THEN
%>
[COLOR=”Red”]<script language=”JavaScript”>
window.open(“http://dynedrewnett/asp/chatroom/enter_chat.asp”, “Dyne DrewNett Chat Room”, “toolbar=0,location=0,statusbar=0,menubar=0,width=8 00,height=600,left=128,top=128”);
document.location = “http://dynedrewnett”;
</script>[/COLOR]
<%
ELSE
Response.Redirect(Request.Cookies(“Destination”))
END IF
END IF
%>[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Aug 10.2009 — You can not have spaces in the window name

"Dyne DrewNett Chat Room"

needs to be

"Dyne_DrewNett_Chat_Room"

Eric
Copy linkTweet thisAlerts:
@GardyauthorAug 10.2009 — Superstar - thanks for that.
×

Success!

Help @Gardy 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...