Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi.
I have 2 devices (assume they are adsl modems) and i can reach their management consoles by typing 172.16.etc.
Now i want to create an html file having only one simple button with the name of "Activate all systems"
When user clicks on it, some checkboxes of management console websites (opened another tabs or windows) should be checked and some buttons should be clicked.
Briefly, there are 2 devices, their management consoles have "launch" buttons and i want to click them at the same time by another html file.

What I have tried:

I tried javascript and realised that "same origin policy" restricts it. i think i managed to disable it but have no success overall.
Posted
Updated 3-Aug-18 7:51am

Would you want a website opening another website and clicking buttons and links on that site for you? This isn't possible for pretty obvious security reasons.
 
Share this answer
 
Comments
leone 2-Aug-18 16:27pm    
yes i would like to do that. so what does it mean disabling same origin policy (sop). tutorials say scheme and host and also port number have to be same to interact between tabs. This is called sop and sop is said to be disabled?
F-ES Sitecore 2-Aug-18 17:10pm    
Disabling the cross origin policy is something you can do if you control the site being manipulated, not if you control the site doing the manipulating. What use would a protection be that the one doing the access could simply disable? It would be like disabling Windows Login just because you really want access to the machine.
leone 2-Aug-18 17:53pm    
ok then thanks.
You cannot; as FES Sitecore stated, this is a security concern.

Browsers are designed to isolate the separated tabs be default, and Chrome which has >60% of the market share takes has always taken it a step forward by utilizing different processes for each tab- FF and Edge are both looking into that as well.
 
Share this answer
 
Comments
leone 2-Aug-18 16:42pm    
so you say disabling any security policy wont work. but notice that these web servers are under my possesion. i mean i dont want to access facebook tab, i want to access my modems 172.16... tab.
Launch Chrome with the --disable-web-security command-line switch[^]. This will disable the same-origin policy for that instance of Chrome running on your computer.

NB: Don't browse sites that you don't control in this session.

javascript - Disable same origin policy in Chrome - Stack Overflow[^]
 
Share this answer
 
Comments
leone 3-Aug-18 20:32pm    
no bro i coulndt work it. always access denied error. the code:
win1 = open('https://www.google.com/', 'winname', 'width=800,height=800');
            var a = win1.document.getElementById("page")
Richard Deeming 6-Aug-18 8:06am    
You need to make sure all instances of Chrome are closed before you try to launch a new instance with a command-line switch.

Chrome likes to keep instances running in the background, even after you've closed all Chrome windows.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900