supportoranges
asked on
MM_openBrWindow not working in Safari or Firefox or Internet Explorer
I'm just going to post some code that refuses to open a window. This webpage worked years ago not sure what is going on. party.htm is not opening. code didn't change it is just old
<tr>
<td valign="top" class="namescapital">  ;</td>
<td valign="top" class="namescapital"><stro ng><font size="3" face="Arial, Helvetica, sans-serif"><font size="2">December
2nd, 2005</font></font></strong ></td>
<td valign="top" class="directors"><p><font size="3"><font size="2">Holiday
Party </font><font size="2"><br>
</font></font><font size="3"><font size="2">I <a href="#" onClick="MM_openBrWindow(' events/hol iday2005/p arty.htm', 'Party','s crollbars= yes,resiza ble=yes,wi dth=660,he ight=620') ">More
>> </a></font></font></p></td >
</tr>
<tr>
<td valign="top" class="namescapital"> 
<td valign="top" class="namescapital"><stro
2nd, 2005</font></font></strong
<td valign="top" class="directors"><p><font
Party </font><font size="2"><br>
</font></font><font size="3"><font size="2">I <a href="#" onClick="MM_openBrWindow('
>> </a></font></font></p></td
</tr>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I must have stepped on the function definition during a copy/paste. thanks for helping. i wasn't sure if this was built-in.
>> are there not comments around both of these? <<
Those are HTML comments not Javascript comments. The browser will parse the script if it handles Javascript. The HTML comments are there for browsers that can't handle Javascript but that is pretty much non-existent now.
To comment out Javascript you would use something like (see snippet).
I am glad I could help. Thanks for the grade, the points and the fun question.
bol
Those are HTML comments not Javascript comments. The browser will parse the script if it handles Javascript. The HTML comments are there for browsers that can't handle Javascript but that is pretty much non-existent now.
To comment out Javascript you would use something like (see snippet).
I am glad I could help. Thanks for the grade, the points and the fun question.
bol
// using 2 slashes will comment out the rest of the line
// this is not processes by Javascript and is a comment
// -->
/* This will start a multiline comment
which end with the characters used in reverse (see below)
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
*/ // that is the end of the comment
//-->
ASKER
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_openBrWindow(theURL,win
window.open(theURL,winName
}
//-->
found the above in an old version of the code, it looks like a third party menuing tool may have wiped out the function in what is now the production code -- anyway, are there not comments around both of these? sorry it's been years since i've worked with javascript....