By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Redirect twice

MarkoKlacar
Expert 100+
P: 296
Hi,

I'm wondering if this is possible...I'm using JS,struts and Java by the way...

I've got a call that goes to a JS function, the function takes a variable called url.
At the end of the script it does this:

Expand|Select|Wrap|Line Numbers
  1. self.location.href = url;
What that does is redirect it to the url site, right?

Well, I'm wondering if I can do something like this:

Expand|Select|Wrap|Line Numbers
  1. self.location.href = url;
  2. self.location.href = "myUrl";
That is, redirect it twice so to say...

JS is not my strongest skill, this may be way out there but I think it would solve somethings for me....

Any help is appreciated.

/MK
Sep 30 '08 #1
Share this Question
Share on Google+
3 Replies


Markus
Expert 5K+
P: 6,050
I can't really think of a situation that would require this. Any more info? Might be able to suggest something then.

Cheers,
Mark.
Sep 30 '08 #2

rnd me
Expert 100+
P: 427
no. as soon as you leave the page, script execution stops.
the second command would never fire.

you could use an iframe, form, or img tag if you are trying to talk to the server.
Sep 30 '08 #3

MarkoKlacar
Expert 100+
P: 296
Hey guys,

You've answered my question, I suspected it was not possible to do it anyway.

Thanks....

/MK
Oct 1 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.