Steven_Smith
06-03-2004, 05:00 PM
Hello,
I am trying to get an iframe to target its parents javascript.
Parent
<html>
<head>
<script>
function xyz(){
alert('Way to go')
}
</script>
</head>
<body>
<iframe name="myframe" src="myframe.html" height="100" width="100"><iframe>
</body>
</html>
iframe
<html>
<head>
</head>
<body>
<a href="javascript: window.parent.xyz();">Click me</a>
</body>
</html>
But this doesn't work. Any ideas?
Thanks
Steve
I am trying to get an iframe to target its parents javascript.
Parent
<html>
<head>
<script>
function xyz(){
alert('Way to go')
}
</script>
</head>
<body>
<iframe name="myframe" src="myframe.html" height="100" width="100"><iframe>
</body>
</html>
iframe
<html>
<head>
</head>
<body>
<a href="javascript: window.parent.xyz();">Click me</a>
</body>
</html>
But this doesn't work. Any ideas?
Thanks
Steve