hi all,
ok i have hardly any JavaScript experience but a new feature i am implementing into a site uses iframes (i am implementing graphs that use Google analytics). I have it all working perfectly apart from one problem, the location on the web page. I was wondering how do i move a iframe around the page or if its going to be to difficult, is it possible to put it inside a div tag. I have tried with a div already but it doesn't seem to make a difference.
Many Thanks,
J
control the location of a iframe via a div
Started by welton122, Nov 14 2010 03:38 AM
1 reply to this topic
#1
Posted 14 November 2010 - 03:38 AM
|
|
|
#2
Posted 23 December 2010 - 09:36 AM
<html>
<head>
</head>
<script type="text/javascript">
function changesrc(){
document.getElementById("IFrame1").src="http://forum.codecall.net";
}
</script>
<body>
<input type=button value="Change" onclick="changesrc()"><br><br>
<iframe width="50%" height="50%" id="IFrame1" src="http://google.com"></iframe>
</body>
</html>


Sign In
Create Account


Back to top









