Closed Bug 247353 Opened 20 years ago Closed 18 years ago

I have JavaScript that worked fine in FireFox 0.8, but is now broken in FireFox 0.9

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: gregg, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8

My HTML pages for analyzing ClearCase license usage is from abs-consulting.com
and the JavaScript error is "Error: display_text is not defined". This error
happens in a rollover context where the graph is supposed to depict the count
and usernames of anyone currently using ClearCase. The JavaScript is: 

   <script language="JavaScript">
   <!-- begin script
   function TurnOver(me, display_text)
   {
      display_text.value = me.alt;
      return true;
   }
   //-->
   </script>

Reproducible: Always
Steps to Reproduce:
1. Open Page
2. move mouse over graph plot
3. JavaScript Rollover is activated and error message is written to JavaScript
Console

Actual Results:  
Nothing crashed, but my text info is not displayed. Again, this used to work
fine under FireFox 0.8.


I've tried changing fonts sizes/families and changing themes -- all to know
avail. This doesn't appear to be anything related to fonts or themes. Sounds
like something is missing in your Java Plugin or whatever you use to handle
JavaScript.
Can you attach a minimized testcase showing the problem?
http://bugzilla.mozilla.org/attachment.cgi?bugid=247353&action=enter
Confirmed on Intel/Windows XP  - JavaScript worked with 0.8+ (nightly), error is
reproducible. Contact me for getting logs (if any is written by FF).

Stefano Sartini
Ask for HTML code if needed (t3x)
Sounds similar to my problem using Firefox 1.0 pre.  The about box gave this
info "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913
Firefox/0.10".  I'm using Windows 2000.  Some of my correct javascript code (I
checked it very carefully) will not work in Firefox.
It works in IE, but I haven't tested it in older versions of Firefox or in
Netscape.  My code follows this outline. (I'm not typing it all in order to save
space.)

<script>
var num1 = new Array("data","here")
var num2 = new Array(5)
var num3 = 0

function firstfunc(mynum,yournum)
{code using mynum and yournum (it works)}

function secondfunc()
{code using num1, num2, and num3.
 javascript console says that the three num variables are undefined.}
</script>

Shouldn't secondfunc() have access to the num variables since they are declared
outside of the functions?

ps If you really want the full code I can post it, but I'm pretty sure that the
problem is with the handling of global variables.
This bug was last touched before 1.0.4. Is it still reproducable?
Try the latest branch build (1.0.5): http://www.mozilla.org/products/firefox/
Try the latest nightly trunk build (v1.0+): http://www.mozilla.org/developer
(Reviving old UNCONFs)
Well, the comment 0 problem would have been with whatever was calling the function passing in something undefined, and after two years without a testcase, I'd guess that if we're still doing whatever it was, we intended to do it that way.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
<- VERI based upon lack of response since comment 5.

If a problem still exists, please reopen this bug, or reference this issue in a new bug report.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.