|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
|||
|
|||
|
1) Script Title: omni slide menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lide/index.htm 3) Describe problem: I have a couple omni slide menus on my website at http://www.mm-theory.com. It seems that when I have these menus up, my sidenote doesn't work. My sidenote is that little asterix in the left-hand margin that says "click me" underneath. If you click it, you get a page telling you javascript is disabled (even when it's enabled). I don't get this problem when I remove the menus. The code for the asterix link is as follows: Code:
<a class="margin_icon" onclick="openWin('deeper_problem.htm','',600,1);return false;" href="enablejs.htm" target=_blank>
<img class="margin_icon" src="icons/side.gif" alt="side.gif" border=0>
<br>
<span class="margin_icon">
Click Me!
</span>
</a>
Code:
function openWin(url,name,wid,hgt) {
sw=(screen.width-wid)/2;
sh=(screen.height-hgt)/2;
newwin=window.open(url,name,'width='+wid+',height='+hgt+',top='+sh+'+sh+',left='+sw+',scrollbars=0,menubars=0,toolbars=0,directories=0,location=0,address=0');
mewwin.focus();
}
Code:
<script language="javascript" type="text/javascript" src="openwin.txt"></script> |
|
#2
|
||||
|
||||
|
All I get is a pop up with:
Quote:
Code:
onclick="openWin('deeper_problem.htm','',600,
Just to be on the safe side, your openWin function should be changed to: Code:
function openWin(url,name,wid,hgt) {
var sw=(screen.width-wid)/2;
var sh=(screen.height-hgt)/2;
var newwin=window.open(url,name,'width='+wid+',height='+hgt+',top='+sh+'+sh+',left='+sw+',scrollbars=0,menubars=0,toolbars=0,directories=0,location=0,address=0');
newwin.focus();
}
Code:
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
Code:
<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
//-->
</script>
Code:
<script language="javascript" type="text/javascript" src="openwin.txt"></script> Code:
<script type="text/javascript" src="openwin.js"></script>
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate Last edited by jscheuer1; 08-07-2008 at 08:41 AM. Reason: add info |
|
#3
|
|||
|
|||
|
OMG, it worked!!!
Thanks so much, jscheuer1! It doesn't surprise me that you weren't able to replicate the problem at your end. It seems to work fine on some computers and not others. I get the problem at home but not at work. I have IE 6.0 and FF 5.0 on both, and which browser I use doesn't seem to make a difference. Very strange that getting rid of the code in omnimenu_body.inc was necessary, especially since the code you told me to get rid of was ALL the code in that file (essentially I deleted the file and removed my reference to it in the body of my html page). According to DD's specs on the omni slide menu, I needed that code. |
|
#4
|
||||
|
||||
|
Quote:
Code:
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
Code:
<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
//-->
</script>
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#5
|
|||
|
|||
|
That may be it. I got that code by visiting the demo.htm page and viewing the source code.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|