473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

not working in chrome and fire box but fine in IE

this is the js code, on mouseover it calls dtc function here,,,,,

Expand|Select|Wrap|Line Numbers
  1. if (typeof fcolor == 'undefined') { var fcolor = "#ffffff";}
  2.     if (typeof backcolor == 'undefined') { var backcolor = "#9999CC";}
  3.     if (typeof textcolor == 'undefined') { var textcolor = "#000000";}
  4.     if (typeof capcolor == 'undefined') { var capcolor = "#ffffff";}
  5.     if (typeof width == 'undefined') { var width2 = "130";}
  6.     if (typeof border == 'undefined') { var border1 = "1";}
  7.     if (typeof offsetx == 'undefined') { var offsetx = 10;}
  8.     if (typeof offsety == 'undefined') { var offsety = 10;}
  9. ns4 = (document.layers)? true:false
  10. ie4 = (document.all)? true:false
  11. if (ie4) {
  12.     if (navigator.userAgent.indexOf('MSIE')>0) {
  13.         ie5 = true;
  14.     } else {
  15.         ie5 = false; }
  16. } else {
  17.     ie5 = false;
  18. }
  19. var x = 0;
  20. var y = 0;
  21. var snow = 0;
  22. var sw = 0;
  23. var cnt = 0;
  24. var dir = 1;
  25. if ( (ns4) || (ie4) ) {
  26.     if (ns4) over = document.overDiv
  27.     if (ie4) over = overDiv.style
  28.     document.onmousemove = mouseMove
  29.     if (ns4) document.captureEvents(Event.MOUSEMOVE)
  30. }
  31.  
  32. function drc(text, title,varDir) {
  33.  
  34.     if(!eval("title"))
  35.     {
  36.         title="";
  37.     }
  38.     if(!eval("varDir"))
  39.     {
  40.         varDir=1;
  41.     }
  42.  
  43.  
  44.     dtc(1,text,title,varDir);
  45. }
  46.  
  47. function nd() {
  48.     if ( cnt >= 1 ) { sw = 0 };
  49.     if ( (ns4) || (ie4) ) {
  50.         if ( sw == 0 ) {
  51.             snow = 0;
  52.             hideObject(over);
  53.         } else {
  54.             cnt++;
  55.         }
  56.     }
  57. }
  58. function dtc(d,text, title,varDir) {
  59.     if(title!="")
  60.     {
  61.         txt = "<TABLE WIDTH=150 BORDER=0 CELLPADDING="+border1+" CELLSPACING=0 class=\"c3f3\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD class=\"f1\">"+title+"</TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD class=\"f1\"><FONT COLOR=\""+textcolor+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
  62.         layerWrite(txt);        
  63.     }
  64.     else
  65.     {
  66.         layerWrite(text);
  67.     }
  68.  
  69.     dir = varDir;
  70.  
  71.     disp();
  72. }
  73. function disp() {
  74.     if ( (ns4) || (ie4) ) {
  75.         if (snow == 0)     {
  76.             if (dir == 2) { // Center
  77.                 moveTo(over,x+offsetx-(width2/2),y+offsety);
  78.             }
  79.             if (dir == 1) { // Right
  80.                 moveTo(over,x+offsetx,y+offsety);
  81.             }
  82.             if (dir == 0) { // Left
  83.                 moveTo(over,x-offsetx-width2,y+offsety);
  84.             }
  85.             if (dir == 3) { // top
  86.                 moveTo(over,x+offsetx,y-offsety);
  87.             }            
  88.             showObject(over);
  89.             snow = 1;
  90.         }
  91.     }
  92. }
  93. function mouseMove(e) {
  94.     if (ns4) {x=e.pageX; y=e.pageY;}
  95.     if (ie4) {x=event.x; y=event.y;}
  96.     if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
  97.     if (snow) {
  98.         if (dir == 2) { // Center
  99.             moveTo(over,x+offsetx-(width2/2),y+offsety);
  100.         }
  101.         if (dir == 1) { // Right
  102.             moveTo(over,x+offsetx,y+offsety);
  103.         }
  104.         if (dir == 0) { // Left
  105.             moveTo(over,x-offsetx-width2,y+offsety);
  106.         }
  107.  
  108.     }
  109. }
  110. function layerWrite(txt) {
  111.        if (ns4) {
  112.                 var lyr = document.overDiv.document
  113.                 lyr.write(txt)
  114.                 lyr.close()
  115.         }
  116.         else if (ie4) document.all["overDiv"].innerHTML = txt
  117. }
  118. function showObject(obj) {
  119.         if (ns4) obj.visibility = "show"
  120.         else if (ie4) obj.visibility = "visible"
  121. }
  122. function hideObject(obj) {
  123.         if (ns4) obj.visibility = "hide"
  124.         else if (ie4) obj.visibility = "hidden"
  125. }
  126. function moveTo(obj,xL,yL) {
  127.         obj.left = xL
  128.         obj.top = yL
  129. }
  130.  
  131. function doNothing()
  132. }
Jul 8 '15 #1
1 1625
Dormilich
8,658 Expert Mod 8TB
this code is horribly outdated. better look for a new one.
Jul 8 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
3
by: Solat | last post by:
my problem is that i m using ajax in my web sites but my AJAX only working in microst internet explorer it is not working in fire fox(Moxola) or other borwser please tell my what is th problem i...
2
by: Arif Bangash | last post by:
Hi All, I have a form like this <form id="frmworld" name ="frm" method=POST action "https://select.worldpay.com/wcc/purchase" > <input type="hidden" name="instId" value="135242"> ...
3
by: rjones326 | last post by:
Hi, I'm stupendously mystified by this strange activity. I cannot for the life of me figure out why this will not work in mozilla. I've spent hours mucking around with it. The php file is...
5
by: CoolForU | last post by:
this is my code and i call this code from code behinde file on page load like this useragree.Attributes.Add("onclick", "CheckSelection();") this is working fine with IE but not working with...
3
by: CoolForU | last post by:
I use following css it's working with IE but not working with fire fox #Content_Menu { margin: 0 0 0 0; padding: 6px 6px 0px 6px; width:100%; height:35px; background-color:#999999;
2
by: Shaikh shahnawaz | last post by:
hi i am using object to use media player and the object is as follows: here i am also using custom buttons to play and stop media file it's working fine in IE but not work in firefox and opera. ...
9
by: rakeshvthu | last post by:
hi all, we have a requirement to disable shift click and ctrl click. i have code: document.onmousedown = shiftEnter; function shiftEnter(e) { if (event.shiftKey) {
3
by: aaaaaaaaaaa | last post by:
i have used required field validaiton in validator.js,it working well on ie7 but not in firefox.when i click on submit in firefox it not validate the field.pls help me code used in validator.js is:...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.