Forum Moderators: open
<script language="javascript">
function load(){parent.document.getElementById('iframe1').src = "page1.htm" }
</script>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=700,height=580,left=250,top=50,location=yes,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
It says " line 15, character 1 (that is the "w" window.open), invalid argument.
In Opera and Firefox there is no error message.
What am I doing wrong here?
I'm still in the early stages of learning JavaScript but it looks like your code is missing proper syntax.
if (condition) {do this};
else if (condition) {do this};
else {do this};
Make sure you use () and {} where you should! It looks like it is missing where it needs to be.
It could also be something else or I could be completely off and it is completely something else.
Hope this helps though!
John
Can see any faults in the code, but then there is no visible call to the function, popup, in the quoted code, so I don't know what args are being used.