473,406 Members | 2,816 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,406 software developers and data experts.

Input text does not refresh

dorinbogdan
839 Expert 512MB
I'm working on IExplorer:
The input text (having id = "it") does not refresh at all, neither at large intervals (in the for loop).
But the window.status is refreshed and shows correctly the counter.

[HTML]
<html>
<head>
<title>Refresh test</title>

<script language="JavaScript">

function test1(){
var str = "";
var it = document.getElementById("it");
var max = it.value;
document.body.style.cursor = 'wait';

for(var i=max;i>0;i--){
str += "To apply the Internet Explorer Enhanced Security Configuration to both administrators and all other users, click Next" ;
if (i % 500 == 0){//refresh on every 500 iterations
it.value = i;
window.status = i;
}

}
d1 = new Date();
it.value = 0;
document.body.style.cursor = "default";
}

</script>
</head>
<body>
<input type="button" value="Start loop" onclick="test1()">
<input type="text" id="it" value="5000">

</table>

</body>
</html>

[/HTML]

Is there any trick to overcome this problem?
Feb 16 '07 #1
4 3310
acoder
16,027 Expert Mod 8TB
This works in firefox, so a simple guess would be that "it" must be a reserved word, so use another id and it should work (no guarantees).
Feb 16 '07 #2
dorinbogdan
839 Expert 512MB
If call an alert(i) after it.value = i, the input is refreshed, so the problem seems to be more complicated.
Any suggestion is welcome.
Feb 16 '07 #3
acoder
16,027 Expert Mod 8TB
Ok, I've tested in IE6 and I see your problem. It seems that the button freezes whilst the code runs. In that time, the text input is probably frozen even though the value is being updated.

Anyway, why not just use setInterval instead of this code or are you using this to test speed or something?
Feb 16 '07 #4
dorinbogdan
839 Expert 512MB
Yes, I just want to make a speed test in order to compare string concatenation against StringBuilder.
I know that window.status can also be used but I'm still curious how could solve the refresh issue..., maybe sometime it could be useful.
Feb 19 '07 #5

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

Similar topics

3
by: coffee_man | last post by:
Hi, I have a page with a form. This form has an input field <textarea>. I use it to have my users enter text and on form submit it gets inserted into a db. Initially there is some standard text...
3
by: Chris S | last post by:
I've been unsuccessfully attempting to write a method in Javascript to change an input field from TEXT to SELECT when a user selects (or unselects) a radio button. In my frustration I have been...
7
by: jez123456 | last post by:
Hi, I have the following method where I need to display which database is being processed, however, the label lblDatabase dosn't seem to work until the end. private void...
0
by: lucas | last post by:
Hi, I have a simple input form that i use to add records to a sql server database. Bellow that is a datagrid that has one template column that I use to dispaly the 3 fields with some html...
4
by: Alex | last post by:
Is there any way to delete the value of a html hidden input field from code-behind? I use an html hidden input to store an array of data. I collect this data using Request.Form or Request.Params....
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
16
by: Adda | last post by:
If I cycle through the MdiChildActivate event of the parent form I can read text in a textbox on the child mdiform -- console.writeline(Me.ActiveMdiChild.Controls(1).Text) But if I have a sub...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
3
by: Andez | last post by:
All, I'm having a little trouble getting the value of a select in my html form. I want a list of dates in a dropdown and when the user clicks on refresh it should do the appropriate action. But...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.