Hide div using class in iframe window using javascript - javascript

I have iframe html tag it has an id="FrameDisplay" property and I display other site content in this frame and want to hide the div in frame window, if it is possible, in frame content has class .top-float and i want to hide it.
<div class="row" id="FrameDisplay"> <iframe id="Iframe" src="#" frameborder="0"></iframe> </div>
In my frame window other site display so it possible to hide div using class in JavaScript.

Related

how to implement attributes of iframe to the window only after opening not in the iframe

how to implement attributes of iframe to the window only after opening not in the iframe.
I have iframe tag like this.
<div className="w-6 h-4 ">
<iframe
src="https://mydomin/app"
allow="microphone"
className="bg-white"
height={"100%"}
width="100%"
/>
</div>
so as you can see here in iframe i am using allow attribute. But I don't want to do that in tag. As the window get open in new domian there I want to set allow, Is there any way instead of passing to tag I can set this mydomin/app/. I have codebase access of mydomian/app.

jquery hide function not working on iframe

I'm creating a popup which has an iframe to display content from some other website:
<div id="popup-wrapper">
<div id="iframe-wrapper">
<iframe id="register-frame" src="some url" />
</div>
</div>
I want this to be hidden by default and show up when user clicks a button, here's my jquery:
$(document).ready(function() {
$("#popup-wrapper").hide();
$("#iframe-wrapper").hide();
$("#register-frame").hide();
});
Both the outer divs disappear but the iframe does not, what am I doing wrong?
i have no error when i close the tag iframe, your syntax is not good
<iframe id="register-frame" src="some url"></iframe>

How do I change an iframe's source from a button click inside another iframe?

<div class="tab-pane"
id="viewRateQuote">
<iframe id="frame1"
src="page1"></iframe>
</div>
<div class="tab-pane"
<iframe id="frame2"
src="page2"></iframe>
</div>
I have 2 iframes inside a parent page (all same domain). They display 2 different pages as tabs . When I click a button inside frame1, I want to set the src of frame2 to src="page3". If the user go the the parent page, the
src of frame2 is defaulted to page2. It's only that a specific button is clicked inside frame1 that I need to change the source
Thank you!
To access the parent DOM, you use parent.document.
So to change the src of frame2 from frame1, you do:
document.getElementById("buttonid").addEventListener("click", function() {
parent.document.getElementById("frame2").src = "page3";
});

How to use javascript to locate and click an element in an iFrame

Using Javascript in a webBrowser Control in a form, How do I switch to a iFrame
<iframe id="ContentFrame" class="contentIFrame" onload="checkComplementaryPage()" onmouseover="hoverMenu('dividers')" name="ContentFrame" src="HomeContainer.aspx" scrolling="auto" frameborder="0"></iframe><div id="footer" class="footer">
and then locate and click on an element inside that iFrame?
<div class="innerItem50L">
<input type="submit" name="btnPunch" value="punch" id="btnPunch" style="CURSOR:hand;" />
</div>
I am new to programming and am starting with c#. I know even less about Javascript...
Using the following thread as an example:
Make an event happen in child iframe to the parent window in JavaScript?
You could do the following:
$('#ContentFrame').contents().find('#btnPunch').click();
Note: The iframe's source has to be from the same domain, and contents must be loaded so you should put it after window load.

I have an iframe that expands and when opened, i want it to resize based on the content. Here is my iframe logic. Any suggestions please?

I have an iframe that expands and when opened, i want it to resize based on the content. Here is my iframe logic. Any suggestions please? Here is my iframe script:
<div id="filterblock2" style="display:none;width:305px;">
<iframe id="Filters" frameBorder="0" width="370px" height="1430px" style="display:block;"scrolling="no" src=""></iframe>
<script>
document.getElementById("Filters").src ="../cognosURLrun.outputFormat=&run.prompt=false&cv.toolbar=false&cv.header=false";
</script>

Categories

Resources