I’m attempting to do some scrolling with an iframe, but my Javascript doesn’t seem to be working.
Here’s my code…
<html>
<head>
<script type="text/javascript">
function loadorder() {
theFrame = document.getElementsByName("iframename");
if (theFrame <> null) {
theFrame.src="";
theFrame.contentWindow.scrollTo(528,65)
}
else {
alert("could not get iframe element!");
}
}
</script>
</head>
<body>
<iframe name="iframename" src="http://www.domain.com/otherpage.html" frameborder="0"></iframe>
</body>
</html>
I got this code from another site and have modified it a little to fit my needs.
Basically what I’m trying to do is show a banner from another HTML page in the iframe on this page.
It’s all on the same domain though, so I’m not really sure why this isn’t working…
Like Ktash said the SQL not equal won’t work in javascript:
However, with javascript
nullandundefinedequates to false. So you can do this: