JS variable not resetted going back on this page (ie7 has different behaviour)

RESOLVED INCOMPLETE

Status

()

Firefox
Toolbars and Customization
RESOLVED INCOMPLETE
11 years ago
8 years ago

People

(Reporter: Billy Chin, Unassigned)

Tracking

({testcase})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 2010-11-15])

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: 

At javascript , when i put in Var sVar = false;
this should be everytime post back the page & initial set the value to false.
This is working fine everytime i post back to Web, However, if i click on "Back" button from Navigation toolbox, & click post again, it not reset the sVar = false (keep my variable before click on "Back"!)
This is not reproduce In IE 7 & Netscape 8.1. please make it standard as other browser!



1. When i run my code below with FireFox, & click the "Click Me" button 
, the sVar Return "False". 
2. If i click again, it still return "False" for sVar.(which is 
correct, because value has been reset back to "False"). 
3. However, if i click on "Back" button on Navigation Toolbox there & 
click the "Click Me" button, sVar return "True", which is not right! ( 
it should initial the sVar = "False") 

For others browser like IE 7 , Netscape 8.1, it will reinitial 
sVar="false" on step 3 if i follow the steps above. 


Reproducible: Always

Steps to Reproduce:
1. When i run my code below with FireFox, & click the "Click Me" button 
, the sVar Return "False". 
2. If i click again, it still return "False" for sVar.(which is 
correct, because value has been reset back to "False"). 
3. However, if i click on "Back" button on Navigation Toolbox there & 
click the "Click Me" button, sVar return "True", which is not right! ( 
it should initial the sVar = "False") 


Actual Results:  
Return "True" after follow the steps

Expected Results:  
Return "False" after "Back" button at Navigation toolbox follow by click on "Click Me" button .

Sample Code as below:

<%@ Page Language="VB" %> 
<script language="javascript"> 
var sVar =false; 
function Test(){ 
alert('String Boolean : ' + sVar); 
sVar=true; 
//Extra logic handle here, so checking If already submitted & 
sVar=True, will avoid it rerun submission 
document.forms[0].submit(); 


} 


</script> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
<title>Untitled Page</title> 
</head> 
<body> 
<form id="form1" runat="server"> 
<div> 
<button onclick="Test()" id="test123" >Click Me</button> 
</div> 
</form> 
</body> 
</html>
(Reporter)

Updated

11 years ago
Severity: major → blocker
Created attachment 278048 [details]
testcase as attachment

i can reproduce, but don't know what should be the expected behaviour here
Severity: blocker → normal
Keywords: testcase
Summary: Variable not reset for Navigation Toolbox → JS variable not resetted going back on this page (ie7 has different behaviour)
This bug was reported using Firefox 3.0 or older, which is no longer supported. The bug has also not been changed in over 500 days and is still in UNCO.
Reporter, please retest this bug in Firefox 3.6.10 or later using a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles. If you still see this problem, please update the bug. If you no longer see the bug, please set the resolution to RESOLVED, WORKSFORME.

This is a mass search of unconfirmed bugs that have no activity on them, so if you feel a bug was marked in error, just remove the CLOSEME comment in the whiteboard within the next month.
Whiteboard: [CLOSEME 2010-11-15]
No reply, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.