Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iframe javascript redirect

    Hi,

    I created a poll using a form builder (survey monkey) and would like to have users be redirected to another page after they click submit. Unfortunately, the entire poll is in an iframe and I cannot pull the submit button very easily. I was wondering if there was any way to detect the submit button within the iframe and inject an "onclick="location.href"" when the button is pressed.

    Thank you!!!

    ps: All I have of the form is the link.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,184
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    This is easy *IF* the page inside the <iframe> is coming from the SAME SITE as the page that contains the <iframe>. Otherwise, it is only possible if you have access to the server where the <iframe> comes from and can make some minor changes to the code there.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •