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 8768659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:07:27+00:00 2026-06-13T17:07:27+00:00

I am looking for a way to modify an iFrame attribute (a textbox value

  • 0

I am looking for a way to modify an iFrame attribute (a textbox value actually). The iFrame is on another domain and I do have access to it. From what I understand I must do that after the entire page (iFrame included) is rendered. I tryed something like that:

<script type="text/javascript">
$(window).load(function() {
    alert("test");
    d = document.getElementById("myframe");
    d.contentWindow.document.getElementById("frametxtbox");
});
</script>

But I always get the following error:

Cannot call method ‘getElementById’ of undefined

I also noticed that the alert pops up BEFORE the iFrame is rendered, so I think my script is executed before page has access to frame values and, therefore I get the error. I have very few knowledge of web-related programming (always worked on backend side) so forgive me if my question maybe makes no sense.

  • 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-06-13T17:07:29+00:00Added an answer on June 13, 2026 at 5:07 pm

    If the iframe points to another domain, it’ll be subject to same origin policy. This means that before you try to access its document you’ll have to check the wiki and relax the policy (check the link for details). After that you’ll need to bind ready event to the iframes document, rather than your main page doc.

    $(window.frames['myframe'].document).ready(function() { alert('moo'); });
    

    See if this helps 🙂

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

Sidebar

Related Questions

I am looking for a way that allows me access an object from another
I'm looking for An easy trick/Way to modify paramter value of a section in
I'm looking for a way to modify my .hgignore file to ignore all Properties/AssemblyInfo.cs
I'm looking for the best way to modify the Boost Asio HTTP Server 3
we are looking for a way to find out (not modify, just find out)
Possible Duplicate: Modify the URL without reloading the page I'm looking for a way
I'm looking for a way to modify the i-th element of haskell List. let
I'm looking for a way to modify properties on a dynamic C# 4.0 object
I'm looking for a way to interface with an external camera from an Android
I'm looking for a good way to save pictures from website. I'm given the

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.