Skip to main content
Jeffery.Wright
Inspiring
January 31, 2022
Answered

Canvas within a page's iFrame, click to open a URL in that page's second iFrame?

  • January 31, 2022
  • 1 reply
  • 321 views

My HTML5 Canvas is on a web page presented from within another page's iFrame. 

The Canvas is to be used as a sort of visual menu to open up other pages within a second iFrame on the same host page, so far nothing I have tried can do this. 

 

My canvas is presented on the host page in the top iFrame, the lower iFrame is to display various web pages.

 

I have tried:

 

this.select_A.b_A.on("click", function () {
	window.open( '//website.com/page01.html', 'productsIframe')
	});

this.select_A.b_A.on("click", function () {
	productsIframe.src="//website.com/page01.html";
	});

this.select_A.b_A.on("click", function () {
	document.getElementById("productsIframe").src="//website.com/page01.html";
	});

	...and so on.

 

I even created a function with similar code, fired from the click event, another no-go. 

How is it possible to open a url in another iFrame on a mouseclick event from canvas? 

 

This is possible, surely. Isn't it? 

Thanks in advance for any helpful insight. 

 

 

This topic has been closed for replies.

1 reply

ClayUUIDCorrect answer
Legend
January 31, 2022