Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6174299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:43:46+00:00 2026-05-23T23:43:46+00:00

Cutting to the chase: I have a Google Forms survey, and basically I need

  • 0

Cutting to the chase:

I have a Google Forms survey, and basically I need to dynamically edit one of its text-inputs.

The Forms survey is actually 1 out of 6 possible surveys, so Javascript adds it:
'<iframe name="survey" id="ifrm" src="https://spreadsheets.google.com/spreadsheet/embeddedform?formkey=dHpYM1NvTFN4OElNWnBJWUtjdHhld2c6MQ" width="760" height="623" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>'

The trouble is accessing that textbox – I used setTimeout() to wait until the iFrame is loaded properly. And then I want to do this:

function writeEncoded() {
        alert("now attempting to inject");


        var iF = document.getElementById('ifrm');
        alert( iF); 

        //works up to here
        var form = iF.contentWindow.document; //does not run.
        alert (form);
        form.getElementById('entry_3').value = "Hi";

    }

Any ideas what’s going wrong?
Thanks guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:43:47+00:00Added an answer on May 23, 2026 at 11:43 pm

    You’re seeing Same Origin Policy in action.

    On the web, content on one website is mostly not allowed to interact with content on another.

    Since the iframe is loaded from https://spreadsheets.google.com and (I’m guessing) your webpage is on another website (like http://example.com/), your JavaScript can’t see anything inside the iframe (and Google’s JavaScript can’t see anything on your webpage).

    Why? Same Origin Policy is meant to protect you. Without it, I could load google.com into an iframe on my website and, with JavaScript, read your email address (if you’re logged in). Or, I could load facebook.com and read your name and quite a bit of other personal information out of the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are working with some new Cutting Tools that can have it's hardware parameters
We have started to use spring aop for cross cutting aspects of our application
I have an apparently simple regex query for pipes - I need to truncate
I have a single audio file, I'd like to avoid cutting it up. I
Short of cutting and pasting, is there a way to sort the methods in
This is similar to the cutting stock problem , but with a slight difference.
I've been using some basic AOP style solutions for cross-cutting concerns like security, logging,
I am working on a project where I produce an aluminium extrusion cutting list.
Can anyone give an idea of how should I implement undo/redo of cutting/copying/pasting of
What is a good free library for editing MP3s/FLACs. By editing I mean: Cutting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.