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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conflicting JavaScripts? HELP! 1

Status
Not open for further replies.

JavaJedi

Programmer
May 24, 2002
12
US
Below is a snippit of code from my site. I am using a Java menu ("sniffer.js") that has always worked beautifully. I was trying to have a small window pop up using the OnLoad command but have had no luck. On a regular HTML document the OnLoad command works perfect. However, when I try to use the "sniffer.js" menu and the Popup Window on the same page, the menu comes up, but the Popup Window never opens. Help Anyone?

-------------------------------------------------------------------

<script language=&quot;javascript&quot; src=&quot;java/sniffer.js&quot;></script>
<script language=&quot;javascript&quot;>

function launch(){
window.open(&quot;URL.com/Message.html&quot;, &quot;messageWindow&quot;, &quot;width=300,height=150,top=20,left=20,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no&quot;);
}

</script>

----------------------------------------------------------------------
 
Try calling sniffer.js after your code (you never know....)


<script language=&quot;javascript&quot;>

function launch(){
window.open(&quot;URL.com/Message.html&quot;, &quot;messageWindow&quot;, &quot;width=300,height=150,top=20,left=20,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no&quot;);
}

</script>
<script language=&quot;javascript&quot; src=&quot;java/sniffer.js&quot;></script> -- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Is there a launch function in sniffer.js? If so change the name of yours

function myLaunch()...

Good luck
-pete
 
No, putting the call for &quot;sniffer.js&quot; after the function to open the window doe snot make any difference.

No, there is no &quot;launch&quot; for the sniffer.js file, just what is scripted in my first message.

Any help or comments are always welcome....
 
Here is how the launch is being called:
------------------------------------------------------

<body bgcolor=&quot;#CCCCCC&quot; text=&quot;#000000&quot; link=&quot;#CC0033&quot; vlink=&quot;#666666&quot; background=&quot;img/scanlines.gif&quot; OnLoad=&quot;launch()&quot;>
 
Try this, remove your onload attribute from <body> and add this script in <head></head>

<script language=&quot;javascript&quot; for=&quot;onload&quot;>
window.open(...);
</script>


-pete
 
HEY PETE, THANKS!!!

Your last suggestion worked and now the index page for my site is functioning the way I wanted it to. Much Thanks!!!
 
Need fix Pete - you get a star! ---------------------------------------
[turkey] HAPPY THANKSGIVING!!!! [turkey]
mikewolf@tst-us.com
 
Isn't there an IE bug about avoiding empty <script..></script> phrases with a workaround like <script...>/*workaround*/</script> ?

bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top