Click on control within iframe with Jquery or JavaScript

0

I have a iframe within my page, what happens is that within this iframe (web page of another domain), to access some functions you must create your session and log in, until there is no mess, the problem occurs when a user leaves their session open within the page that calls this iframe , when another person enters this same option finds the session of the other person activated.

What I want to do is:

1) Use the function .click() of jquery to press the button that closes the session of the person (as if she were to press it).

2) Execute the function in javascript existing on that page that sends the action to log out; I have it identified, but when I try to access it, it issues me an exception of DOM (something with Access-Control-Allow-Origin ).

3) Delete the session variable ASP ( ASP.NET_SessionId ) that that page generates within my iframe so that the session created by the user is reset.

Any of the options would help me, just I need a way to make the session (if they left it open) close whenever they access the option.

I add:

The error that appears in alternative two is this

  

Uncaught DOMException: Blocked a frame with origin "localhost: 49794";   from accessing to cross-origin frame. at: 1: 49

And the method you use to try to access that function, take it from this page: link

    
asked by Fabian Montoya 12.09.2017 в 15:41
source

0 answers