Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid ol' IE ...

Status
Not open for further replies.

gruvn

Programmer
Oct 15, 2004
24
CA
Hey,

I've got the following javascript for opening a new window. My problem is that it doesn't work in IE (which doesn't seem to have a javascript console). It does work in Opera, Firefox and Netscape.

Here's the code. If anyone has any cleaner window-opening code that *does not cause the original window to reload itself to the top of the page* - I'm all ears. My page is really long, and I don't want people to lose their place just for opening a window with a bigger picture on it...

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
-->
</script>

<a href="javascript: MM_openBrWindow('db/dbimages/big/pic.jpg', 'title', 'toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, top=25, left=25, width=775, height=775')">
<img src="pic.jpg" alt="name" height="100" title="name">
</a>

Thanks everyone!

Mike
 
The only suggestion I have right now is this:

<a href="#" onclick="MM_openBrWindow('db/dbimages/big/pic.jpg', 'title', 'toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, top=25, left=25, width=775, height=775'); return false;">
<img src="pic.jpg" alt="name" height="100" title="name">
</a>

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top