user2622044
user2622044

Reputation: 185

Load Page to Iframe with using javascript

I got Page work with parameter and ı want to show it in iframe. however when ı set to iframe location my iframe not load all javascript. Normally Page works. My ıframe was working too. but now it is not working. why?

 window.frames["MyFrame"].location = "Component/Component.php?pagename="+$(Element).attr("page-name");

it is my javascript code for set iframe location.

Upvotes: 0

Views: 10856

Answers (2)

SarathSprakash
SarathSprakash

Reputation: 4624

Try this

document.getElementById('MyFrame').src="Component/Component.php?pagename="+$(Element).attr("page-name");

Upvotes: 1

Ivan Chernykh
Ivan Chernykh

Reputation: 42166

Try src attribute :

window.frames["MyFrame"].src = //...

Upvotes: 4

Related Questions