/    Sign up×
Community /Pin to ProfileBookmark

All Right; I can’t do it. Please Help?

This is me, posting here out of good ol’fashioned desperation. I’m not ashamed to admit that I really need some serious HELP.

A friend and I are working on a highly Matrix-themed site(not about the movies; it’s a personal site, and it’s very important for a lot of reasons that I’m not going to get into here – just say it’s personal philosophy.)I found this wonderful code, on this site, here: [url]http://javascript.internet.com/bgeffects/matrix.html[/url] , and was able to tweak it to do what I wanted it to do, except for ONE THING that is driving me ABSOLUTELY CRAZY. No matter how many hours I spend looking or trying to adjust it, I can’t seem to get it to work.

The code starts up by clicking a link on the page; that part, I got. Then it brings up a separate window, with the scrolling messages. Now, when that window closes, it simply leaves you back on the page you started from, with the same link you clicked on to get the new window in the first place. What I WANT it to do, is instead of simply closing, I’d LIKE the closing of the message window to trigger a redirect in the original page: so that when the “Matrix” message window closes, it automatically brings you to a new page.

I can NOT seem to find a working code to make this happen.
In this order: 1)Page loads. 2)User clicks on link. 3)Matrix message window pops up and writes. 4)Matrix window closes, and 5)Original page is redirected to a new URL.

Am I just dumb? Can ANYONE help me with this, please? I’m desperate here. Honestly.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@requestcodeSep 29.2004 — When they click on a link in the popup you could have it perform a function like so:

function Closeme(url)

{

opener.location.href=url

window.close()

}

Your link could look like this:

<a href="javascript:Closeme('http://www.mysite.com')">Click Me</a>

Or:

<a href="#" onClick="Closeme(''http://www.mysite.com')">Click Me</a>

The term "opener" refers to the window that opend the popup. You can also perform functions in the "opener" from the popup like this:

opener.function_name()

Hope that helps and no you are not dumb. Good Luck!
Copy linkTweet thisAlerts:
@Warren86Sep 29.2004 — Hi Neo: :-)

Find this line, in your current version

setTimeout("matrix_window.close()", timer);

Change it to this:

setTimeout("getNextPage('1.html')", timer);

1.html is the "redirect" page.

Immediately below the opening credits which are immediatley below the opening Script tag, put this:

window.opener = self;

function getNextPage(fName){

matrix_window.close();
opener.location.replace(fName);

}

I tested it, and it worked for me. Pretty cool actually, it looks just like the black screen with the green DOS characters.
Copy linkTweet thisAlerts:
@6thAnomalyauthorOct 01.2004 — YOU ARE.... unbelievable.

IT WORKED!!!

Thank you, thank you, thank you.


I've been struggling with that code for forever. </braindead.> Thank you, thank you.
×

Success!

Help @6thAnomaly 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.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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