www.webdeveloper.com
Results 1 to 2 of 2

Thread: iframe submit redirect

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    1

    iframe submit 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. #2
    Join Date
    Feb 2011
    Posts
    231
    Hi,
    If the page with the iframe is on the same domain, you can call a JavaScript function in the main page from iframe.
    Example, added in the button in iframe:
    Code:
    onclick="parent.function_in_parent_page();"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles