1

I am developing a website in which i need to open a HTML page and after a clicked by a user on a link. It will redirect at somewhere. But what i want to open an another link after this redirection within same tab.

For example : I am on my 4shared.com account and when i click on a link to download something. after successfully redirect of that download link. It will automatically open an another link with in same page.

Thanks in advance

4
  • What is your question? It's not clear from your description what the problem is and how we can help you. Commented Jul 9, 2011 at 14:31
  • I just put an example. There is a link on my web page which download a file from 4shared.com. I want that when someone click on that url then required download will start as well as it will redirect on another page Commented Jul 9, 2011 at 19:21
  • Then just open the download link in a new window and redirect the old one to where you want it to redirect to. Commented Jul 9, 2011 at 19:54
  • I want to do this on a single click and in a same tab Commented Jul 10, 2011 at 7:22

1 Answer 1

1

Use php.

Lets say that I click on a download link. It would most probably bring me to a download.php page. It could download the file and then use an if statement (excuse my bad syntax, I usually do bash and C):

 <?php // download code, or any other code if (file is downloaded) { header( 'Location: http://url.of.target' ) ; } else { // do nothing and continue downloading } ?> 

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.