Click here to Skip to main content
15,885,823 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Preserve the form status Pin
CodingLover5-May-11 17:58
CodingLover5-May-11 17:58 
QuestionHow can i refresh status bar information... Pin
Olli Ikonen29-Apr-11 23:42
Olli Ikonen29-Apr-11 23:42 
AnswerRe: How can i refresh status bar information... Pin
DaveAuld29-Apr-11 23:59
professionalDaveAuld29-Apr-11 23:59 
GeneralRe: How can i refresh status bar information... Pin
Olli Ikonen30-Apr-11 0:31
Olli Ikonen30-Apr-11 0:31 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 0:33
professionalDaveAuld30-Apr-11 0:33 
GeneralRe: How can i refresh status bar information... Pin
Olli Ikonen30-Apr-11 1:37
Olli Ikonen30-Apr-11 1:37 
GeneralRe: How can i refresh status bar information... Pin
Luc Pattyn30-Apr-11 2:26
sitebuilderLuc Pattyn30-Apr-11 2:26 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 4:05
professionalDaveAuld30-Apr-11 4:05 
Here is a working script (Note: Only tested in Chrome).
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Status update test</title>

    <script type="text/javascript">

        var update = false;
        var x = 0;
        var theString = "";

        function start() {
            update = true;
            setTimeout(function () { statusUpdate(); }, 10);

            StartTimer.value = "Running.....";
        }

        function theInc() {
            if (x < 10000000) {
                //Do an increment
                x++;
                //update the status value
                theString = "Loop Value: " + x.toString();
            }
            else {
                //Finished updating
                StartTimer.value = "Finished";
                update = false;
            }
        }

        function statusUpdate() {
            TheValue.innerHTML = theString;
            window.status = theString;

            if (update) {
                theInc();
                setTimeout(function () { statusUpdate(); }, 10);
            }
            else {
                TheValue.innerHTML = "Finished updating";
                window.status = "Finished updating";
            }
        }

    </script>

</head>
<body>
    This is a test update page for the status updates within loop.

    <input id="StartTimer" type="button" value="Start with Timer" onclick="start();" />

    <div id="TheValue"></div>
    
</body>
</html>

Dave
Find Me On: Web|Facebook|Twitter|LinkedIn

Folding Stats: Team CodeProject

GeneralRe: How can i refresh status bar information... Pin
Luc Pattyn30-Apr-11 4:48
sitebuilderLuc Pattyn30-Apr-11 4:48 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 4:51
professionalDaveAuld30-Apr-11 4:51 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 6:35
professionalDaveAuld30-Apr-11 6:35 
GeneralRe: How can i refresh status bar information... Pin
DaveAuld30-Apr-11 5:32
professionalDaveAuld30-Apr-11 5:32 
QuestionWhat in a world i'm doing wrong... Pin
Olli Ikonen30-Apr-11 6:47
Olli Ikonen30-Apr-11 6:47 
AnswerRe: What in a world i'm doing wrong... Pin
Luc Pattyn30-Apr-11 6:52
sitebuilderLuc Pattyn30-Apr-11 6:52 
NewsSorry Pin
Olli Ikonen30-Apr-11 10:01
Olli Ikonen30-Apr-11 10:01 
GeneralRe: What in a world i'm doing wrong... Pin
DaveAuld30-Apr-11 19:58
professionalDaveAuld30-Apr-11 19:58 
AnswerRe: What in a world i'm doing wrong... Pin
Luc Pattyn30-Apr-11 21:27
sitebuilderLuc Pattyn30-Apr-11 21:27 
AnswerDuplicate - Your question also in Q/A section Pin
thatraja30-Apr-11 7:04
professionalthatraja30-Apr-11 7:04 
GeneralRe: How can i refresh status bar information... Pin
thatraja30-Apr-11 8:22
professionalthatraja30-Apr-11 8:22 
NewsSorry Pin
Olli Ikonen30-Apr-11 10:01
Olli Ikonen30-Apr-11 10:01 
Question[RESOLVED] innerHTML messed up Pin
CodingLover27-Apr-11 18:58
CodingLover27-Apr-11 18:58 
AnswerRe: innerHTML messed up Pin
AspDotNetDev27-Apr-11 19:43
protectorAspDotNetDev27-Apr-11 19:43 
GeneralRe: innerHTML messed up Pin
CodingLover27-Apr-11 21:09
CodingLover27-Apr-11 21:09 
AnswerRe: innerHTML messed up Pin
Gerben Jongerius27-Apr-11 20:53
Gerben Jongerius27-Apr-11 20:53 
GeneralRe: innerHTML messed up Pin
CodingLover27-Apr-11 21:11
CodingLover27-Apr-11 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.