Closed Bug 290450 Opened 19 years ago Closed 19 years ago

dhtml not working as expected with <MARQUEE> tag

Categories

(Firefox :: General, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: chewkit, Assigned: bugzilla)

Details

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: javascript error

Hi,i face a problem (maybe is a bug) when my javascript and HTML <MARQUEE> tag 
run in firefox.
Before add the <MARQUEE> tag,my javascript can detact user scroll the 
scrollbar,
and my <DIV> object will automatic move down.
But after i add the <MARQUEE> tag,my javascript no response to the user scroll.
below are my script.



<script language="JavaScript">
        var isNS = 0; 
				if (navigator.appName.indexOf('Netscape') != -
1) {isNS = 1;}
        var popupWinoldonloadHndlr=window.onload, popupWinpopupHgt, 
popupWinactualHgt, popupWintmrId=-1, popupWinresetTimer;
        var popupWintitHgt, popupWincntDelta, popupWintmrHide=-1, 
popupWinhideAfter=5000, popupWinhideAlpha, popupWinhasFilters=true;
        var popupWinnWin, popupWinshowBy=null, popupWindxTimer=-1, 
popupWinpopupBottom;
        var 
popupWinnText,popupWinnMsg,popupWinnTitle,popupWinbChangeTexts=false;
        window.onload=popupWinespopup_winLoad;

        var popupWinoldonscrollHndr=window.onscroll;
        window.onscroll=popupWinespopup_winScroll;
        popupWinnText="<head><title>Title here</title><style 
type=\"text/css\">body {    background:#E0E9F8; padding:5px;    
filter:progid:DXImageTransform.Microsoft.Gradient(     
GradientType=0,StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');  }  h1 
{    font:bold 16px arial,sans-serif; color:#1F336B;     text-align:center; 
margin:0px;  }  p {    font:14px arial,sans-serif; color:#1F336B;  }
</style></head><body><h1>Title here</h1><p>This very long text will be 
displayed in new window. To open this window click on \"Show Popup\" button 
and then click on popup window.</p></body>";

        function popupWinespopup_winScroll()
        {
          if (popupWinoldonscrollHndr!=null) popupWinoldonscrollHndr();
          if (popupWintmrHide!=-1)
          {					  
            el=document.getElementById('popupWin');			
			
            el.style.display='none';
						
						if (isNS == 1)
						{			
			
            el.style.bottom=(el.offsetHeight - window.pageYOffset)+'px'; 
						
						}			
			
						el.style.display='block';
			
          }
        }

        function popupWinespopup_ShowPopup(show)
        {
          if (popupWindxTimer!=-1) { el.filters.blendTrans.stop(); }

          if ((popupWintmrHide!=-1) && ((show!=null) && 
(show==popupWinshowBy)))
          {
            clearInterval(popupWintmrHide);
            popupWintmrHide=setInterval
(popupWinespopup_tmrHideTimer,popupWinhideAfter);
            return;
          }
          if (popupWintmrId!=-1) return;
          popupWinshowBy=show;

          elCnt=document.getElementById('popupWin_content')
          elTit=document.getElementById('popupWin_header');
          el=document.getElementById('popupWin');
          el.style.left='';
          el.style.top='';
          el.style.filter='';

          if (popupWintmrHide!=-1) clearInterval(popupWintmrHide); 
popupWintmrHide=-1;

          document.getElementById('popupWin_header').style.display='none';
          document.getElementById('popupWin_content').style.display='none';

          if (navigator.userAgent.indexOf('Opera')!=-1)
            el.style.bottom=(document.body.scrollHeight*1-
document.body.scrollTop*1
                            -
document.body.offsetHeight*1+1*popupWinpopupBottom)+'px';		
									
							
          
          if (popupWinbChangeTexts)
          {
            popupWinbChangeTexts=false;
            document.getElementById('popupWinaCnt').innerHTML=popupWinnMsg;
            document.getElementById
('popupWintitleEl').innerHTML=popupWinnTitle;
          }

          popupWinactualHgt=0; el.style.height=popupWinactualHgt+'px';
          el.style.visibility='';
          if (!popupWinresetTimer) el.style.display='';
          popupWintmrId=setInterval(popupWinespopup_tmrTimer,
(popupWinresetTimer?1000:20));
        }

        function popupWinespopup_winLoad()
        {
          if (popupWinoldonloadHndlr!=null) popupWinoldonloadHndlr();

          elCnt=document.getElementById('popupWin_content')
          elTit=document.getElementById('popupWin_header');
          el=document.getElementById('popupWin');
          popupWinpopupBottom=el.style.bottom.substr(0,el.style.bottom.length-
2);
          
          popupWintitHgt=elTit.style.height.substr(0,elTit.style.height.length-
2);
          popupWinpopupHgt=el.style.height;
          popupWinpopupHgt=popupWinpopupHgt.substr(0,popupWinpopupHgt.length-
2); popupWinactualHgt=0;
          popupWincntDelta=popupWinpopupHgt-(elCnt.style.height.substr
(0,elCnt.style.height.length-2));

          if (true)
          {
            popupWinresetTimer=true;
            popupWinespopup_ShowPopup(null);
          }
        }

        function popupWinespopup_tmrTimer()
        {
          el=document.getElementById('popupWin');
          if (popupWinresetTimer)
          {
            el.style.display='';
            clearInterval(popupWintmrId); popupWinresetTimer=false;
            popupWintmrId=setInterval(popupWinespopup_tmrTimer,20);
          }
          popupWinactualHgt+=5;
          if (popupWinactualHgt>=popupWinpopupHgt)
          {
            popupWinactualHgt=popupWinpopupHgt; clearInterval(popupWintmrId); 
popupWintmrId=-1;
            document.getElementById('popupWin_content').style.display='';
            if (popupWinhideAfter!=-1) popupWintmrHide=setInterval
(popupWinespopup_tmrHideTimer,popupWinhideAfter);
          }
          if (popupWintitHgt<popupWinactualHgt-6)
            document.getElementById('popupWin_header').style.display='';
          if ((popupWinactualHgt-popupWincntDelta)>0)
          {
            elCnt=document.getElementById('popupWin_content')
            elCnt.style.display='';
            elCnt.style.height=(popupWinactualHgt-popupWincntDelta)+'px';
          }
          el.style.height=popupWinactualHgt+'px';
        }
        
        function popupWinespopup_tmrHideTimer()
        {
          
        }
        
        function popupWinespopup_dxTimer()
        {
          clearInterval(popupWindxTimer); popupWindxTimer=-1;
        }
     
        function popupWinespopup_Close()
        {
          if (popupWintmrId==-1)
          {
            el=document.getElementById('popupWin');
            el.style.filter='';
            el.style.display='none';					
	
						
            if (popupWintmrHide!=-1) clearInterval(popupWintmrHide); 
popupWintmrHide=-1;
            
          }
        }
    
        function popupWinespopup_ShowWindow()
        {
          
          if (popupWinnWin!=null) popupWinnWin.close();
          popupWinnWin=window.open
('','popupWinnWin','width=300,height=200,scrollbars=no, '+
            'menubar=no, resizable=no, status=no, toolbar=no, location=no');
          popupWinnWin.document.write(popupWinnText);
        }

        
</script>

<div id="popupWin" style="border:1px solid #000000; display:none; 
position:absolute; z-index:9999;  width:182px; height:116px; right:1px; 
bottom:1px;" onselectstart="return false;"  >
<div id="popupWin_header" style="cursor:default; display:none; 
position:absolute; left:0px; width:178px; top:5px; height:18px; font:12px 
arial,sans-serif; color:#000000; text-decoration:none;">

<span 
id="popupWintitleEl"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A
lert</b></span>
<span style="position:absolute; right:0px; top:2px; cursor:pointer; 
color:#000000; font:bold 10px arial,sans-serif; position:absolute; right:4px;" 
onclick="popupWinespopup_Close()" onmousedown="event.cancelBubble=true;" 
onmouseover="style.color='#455690';" 
onmouseout="style.color='#728EB8';">&nbsp;&nbsp;&nbsp;</span></div>

<div id="popupWin_content" onmousedown="event.cancelBubble=true;" 
style="display:none; border-left:0px solid #000000; border-top:0px solid 
#000000; border-bottom:0px solid #000000; border-right:0px solid #000000; 
padding:0px; overflow:hidden; text-align:center; position:absolute; left:0px; 
width:178px; top:30px; height:80px;">

<br><font color=#000000>A message</font><br><br>&nbsp;&nbsp;<a href="pm.php?
folder=inbox" target="_blank"><font color=red>Click Here</font></a>
</div></div>

		<MARQUEE onmouseover=this.stop(); 
									
				onmouseout=this.start(); scrollAmount=3><A 
                        href="http://www.yahoo.com" 
                        target=_blank><SPAN class=bold><FONT 
                        color=blue>Yahoo</FONT></SPAN> 
                        </A>&nbsp; &nbsp; &nbsp; &nbsp;<A 
                        href="http://www.msn.com" 
                        target=_blank><SPAN class=bold>MSN</SPAN> 
                        </A>&nbsp; &nbsp; &nbsp; &nbsp;<A 
                        href="http://www.google.com" 
                        target=_blank><SPAN class=bold><FONT 
                        color=red>Google</FONT></SPAN></A></MARQUEE>
		
		<pre>

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1						
		</pre>



Reproducible: Always
Reporter, can you attach a reduced testcase to show your problem? (Click on
"Create a New Attachment" and go from there).

Also, have you tried a nightly (1.1beta) build?
http://ftp.uni-erlangen.de/pub/mozilla.org/firefox/nightly/latest-trunk/
Attached file the source code
Reporter can you please shorten that to a simple html attachment with only the
parts which exhibit this problem (start trimming out code/html until you have
only the REQUIRED parts to show this bug)

Thank You.
Attached file testcase
I attached the file "after.html".
Everything seems to work normal.
Definitly no crash
it's not about a crash of Firefox, it's about reproter's script not working as
expected. Reporter, bugzilla is not the right place to ask for web developer
support, please use other places for that. Regarding your example, it's not
clear whether it's a mozilla bug or your bad code. If you're able to create a
minimized testcase showing a bug in mozilla, please create it and attach it
here. Thanks.
Summary: dhtml crash with HTML <MARQUEE> tag → dhtml not working as expected with <MARQUEE> tag
There is no <MARQUEE> tag in HTML. The poster might have a look at the
moz-behaviors.xml at http://dean.edwards.name/my/ , which I think is designed to
do what he wants.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: