Answer the question
In order to leave comments, you need to log in
Web application jquery + php + mysql. How to open a tab of an external site and transfer js code there?
In general, I have ideas, but I do not understand how to implement. I searched the Internet for a long time, but did not find the answer. How is it possible to switch to a third-party service, but at the same time pass js code, for example, with a timer to a reverse redirect. A person visited my site, I send him a redirect, for example, to vk.com with js code for a reverse redirect in 600 seconds, 6 minutes pass and the user returns to the site.
Answer the question
In order to leave comments, you need to log in
Specifically, your task cannot be done for security reasons.
but you can try to load it in a frame though this is nonsense.
if you want to like or repost - VK has modules for inserting into your site. and letting a person into VK to send him back will not work.
but if you suppose you owned VK and tried to do this, that is, such jsonp crap, when you send the name of a method written in advance in the second system and call it on the client side.
but none of the VKontakte developers will write this for you.
You need to open a window using the window.open method.
This method returns a reference to the window being opened and you can close it after a while.
Sample Code
var w = window.open('https://vk.com');
setTimeout(function(){
w.close();
}, 5000);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question