Unable to connect to iframe using DDmenu

I am facing an issue with my CSS banner/menu. The links (buttons) are supposed to target an iframe on the same page, but it's not functioning as expected. When clicking on the links, nothing appears in the iframe except for the source page. This results in a blank space within the iframe.

Here is a link to see the problem: (click on the link called "target iframe main" and also examine the source)

Answer №1

It seems that when you click on the button, your intention is to change the src of the iframe. However, clicking on the target iframe main button results in the iframe going blank. Checking the console reveals the message "Refused to display '' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."

To see the console error, click here.

This issue is likely due to the target URL being from a different domain, like google.com. One solution could be to upload another page on the same domain and test it there.

If you still need to display a webpage from a different domain, you may find guidance on how to set 'X-Frame-Options' on an iframe in this resource.

If the problem persists, more details or clarification would be helpful in finding a solution.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Employing setInterval() without clearing previously triggered events

Can someone clarify the distinction between these two functions: function displayTime(){ var current = new Date(); var hours = current.getHours(); var minutes = current.getMinutes(); var seconds = current.getSeconds(); ...

In what way does a child's width vary when set to "100%" or "inherit" from its parent element?

Can a Child element, nested within a Parent, have a width that is different from the parent's width when: 1) the Child's Width is set to 100% 2) the Child's Width is set to 'inherit'? I am experiencing both scenarios. It is challe ...

menu with dropdown options within dropdown options

I am experiencing an issue with creating a nested menu within my navigation header. Specifically, under the "Reports" section, I want to have two submenu items named "Global Shop" and "Ndustrios". When hovering over either of these submenus, additional men ...

RegularExpressionValidator functions as expected, however, RequiredFieldValidator is not successful

I'm having an issue setting up RegularExpressionValidator and RequiredFieldValidator for a textbox in my asp.net web form. The RegularExpressionValidator is working fine and displaying the error message, but the RequiredFieldValidator is not showing t ...

What is the reason behind having a selectedOptions property rather than just a selectedOption?

Why does the selectedOptions property of select return an HTMLCollection instead of just one HTMLOptionElement? As far as I understand (correct me if I'm wrong), a select element can only have one selected option, so why do I always need to access it ...

Issue in Chrome: Body element automatically includes style ""margin-bottom: 18px;"

Despite not applying any inline style to my <body> element, the DOM inspection reveals <body cz-shortcut-listen="true" style="margin-bottom: 18px;">. Attempting to set an inline style on my body element with a margin-bottom of 0 has proven uns ...

Align the child element to the baseline and have it aligned to the right within an `<li>` list item

I am interested in aligning the price of coffee to the right end of the coffee name. For example, the price 1.80 should be in line with Americano and 10.00 should be in line with Macchiato. https://i.sstatic.net/unm26.jpg ul { list-style: none; pad ...

Automatically update div content using jQuery including an AJAX request for loading

I have successfully implemented a method for loading output from now_playing.php (shoutcast now playing content) using a jQuery include ajax call, as recommended in this answer on Stack Overflow. Here is my code: <script> $(function(){ $("#now_ ...

Troubles with Sizing in Twitter Bootstrap Modal

One issue I have encountered with my application is the varying widths of modals. Setting the width inline works well, but when the window is compressed it can cause part of the modal to be off screen, rendering it useless at smaller resolutions such as th ...

What is the best way to keep a header row in place while scrolling?

I am looking to keep the "top" row of the header fixed or stuck during page scrolling, while excluding the middle and bottom rows. I have already created a separate class for the top row in my header code: view image description ...

Hide the div in PHP if the active variable is null

It looks like I'll need to implement Jquery for this task. I have a print button that should only appear if my array contains data. This is a simplified version of what I'm aiming to achieve: HTML <?include 'anotherpage.php'?> ...

What are the steps required to play a YouTube video using Selenium WebDriver?

In my Python script, I am trying to play/pause a YouTube video using driver.find_element_by_name("body").send_keys('keys.SPACE'), but it doesn't seem to work. Is there any alternative method I can use? Since the Selenium method is ...

Tips on avoiding scrolling when toggling the mobile navigation bar:

While working on a website using HTML, CSS, and BS3, I have created a basic mobile navigation. However, I am facing an issue where I want to disable scrolling of the body when toggling the hamburger button. The problem arises when the menu is toggled on, ...

What steps can I take to ensure that my logos remain visible even when I close the menu and resize the window?

On my website, I have a menu of logos that are clickable. These logos always display except on smaller screens, where they need to be toggled to show using a hamburger menu. The menu toggles fine when it is on a smaller screen, but there is an issue when y ...

When using the POST method to modify data via an HTML form, the previous values may be

I am currently developing a CRUD system and focusing on the Update functionality. My task involves updating existing user data with new information submitted through an HTML form. At this stage, I am working on retrieving the POST values from the HTML for ...

Button not displaying box-shadow or drop-shadow effects

Why isn't the filter and box-shadow working on the button? What could be causing this issue and how can it be resolved? .desktop-modal-close-btn { position: absolute; top: 1.5rem; right: 1.5rem; height: 2.8rem; width: 2.8rem; ...

Leveraging ACE in conjunction with WT

UPDATE 3 Here is the finalized working code below. Remember to use ace.js from the src folder, as it will not work from the libs directory. You need the pre-packaged version from their site. WText *editor = new WText(root()); editor->setText("function( ...

The collapsing menu is malfunctioning due to duplicate selectors

Although I have been learning HTML, CSS and jQuery, one area that always trips me up is selectors. Currently struggling with redundant selectors. I am attempting to customize the ul and li elements after collapsing the li, however, the selector doesn&apos ...

How about this: "Unveil the beauty of dynamically loaded

var request = new Request({ method: 'get', url: 'onlinestatusoutput.html.php', onComplete:function(response) { $('ajax-content').get('tween', {property: 'opacity', duration: 'long&apos ...

Is it possible to have two different actions with two submit buttons in PHP?

Here is my form tag: sample name:register.php page <form id="formElem" name="formElem" action="form10.php" method="post"> <input id="pd" name="pd" type="text" AUTOCOMPLETE=OFF /> <input id="pd1" name="fname" type="text" AUTOCOMPLETE=OFF /& ...