dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Java inside an ASP to count "for loop"

  1. #1
    Join Date
    Dec 2012
    Posts
    1

    Java inside an ASP to count "for loop"

    Hello everybody,

    I'm new user.

    I would like to know how to count in real time, on-screen, during a for loop.

    I know that ASP does not allow this, But I think maybe I should use a JavaScript inside the loop.


    ___________________________________________
    The Code:

    '##### After reading from database and creating the RecordSet, I made the for loop ###########


    for x = 0 to 2000

    Member_Name = allMemberData(mM_NAME,x)
    Member_EMail = allMemberData(mM_EMAIL,x)
    Member_id = allMemberData(mM_ID,x)

    Dim new_sha256


    new_sha256 = sha256(Member_Name & Member_EMail & Member_id)


    '################ THEN I WRITE ON DATABASE #############
    strSql = "UPDATE FORUM_MEMBERS SET M_NOMAILCODE = " & "'" & new_sha256 & "'" & " WHERE MEMBER_ID = " & Member_id
    my_conn.execute (strSql)

    '###################################################################


    This works perfectly but the "for loop" are 2000, and a calculation as the sha256 requires a bit 'of time, and I would like, on-screen, during the loop, to see where it came, in real-time.
    At the same way as a "progression bar", or as when software loads some components, which are seen quickly scroll during startup.

    Like a code response.write "Hello, I'm now processing the member ID " & Member_id
    how to say
    Hello, I'm now processing the member ID 1
    Hello, I'm now processing the member ID 25
    Hello, I'm now processing the member ID 40
    Hello, I'm now processing the member ID 100
    and so on" up to 2000

    But if I insert a "response.write" inside the loop, I have as result a number list (the Member ID), at the end of script, not during.
    So I thought I'd better use a Javascrit within the ASP, during the loop, but I don't know what to put in.


    I'm Italian, but thanks to google translator I hope I explained.


    Please, can anyone help me to write the code?



    Thanks

    T4M

  2. #2
    Join Date
    Jan 2008
    Location
    Florida
    Posts
    1,227
    Why would you want to display that? Your script would run so fast that the user would never see much. As for using Javascript, it's a client-side language and can't run inside a server-side script.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles