Get event click inside of iframe with jQuery

5

I'm using Google Forms to do a satisfaction survey on a website. On this site I show a bar at the top, asking the user to participate. If it closes the message, a cookie that expires in 24 hours is saved so that it no longer sees the message on that day.

I would like to save a cookie if the user answers the questionnaire so that he no longer sees the message on the site.

Does anyone know of a way to do this?

  

Editing:   Can I burn the cookie with jQuery.   Is there any way to get the form's click event? Via javascript or jquery.   It's in an iframe and I can not use jquery, for example, and get the click event.

Iframe:

<iframe src="endereco_do_form" width="955" height="700" frameborder="0" marginheight="0" marginwidth="0">Carregando...</iframe>

JQuery:

<script>
    $('#ss-submit').click(function(e){
      e.preventDefault();
      alert("OK")
    });
</script>
    
asked by anonymous 21.08.2015 / 03:35

1 answer

1

To see the contents of this iframe, do this: var frame = window.frames [0] .document; The .frames [0] - > 0 represents the only iframe on the screen, if there is another it is necessary to place an iframe index.

    
10.11.2016 / 13:57