Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
ASP and JavaScript working together
Old 12-19-2006, 08:12 AM ASP and JavaScript working together
Junior Talker

Posts: 3
Trades: 0
Hi. I understand that ASP is server side and JS is, at least in my case, run on the client. So, an ASP process will be run before a JS process. I want to make them work together if possible.

Here is my problem: I have an ASP process that uses a component on my server to FTP files from my server to another. It gets the files it needs and FTP settings from a database and runs great.

Then, I have a progress bar in JS. I can run a loop to test it and it runs great.

Now, I want to combine the two so that as each file is transferred from my server the progress bar progresses. The problem is that the ASP process run to completion before the progress bar is ever displayed on the page.

My next approach is to use an if statement to see if the counter is equal to the number of records from the recordset of files to transfer. Maybe if I do it that way I can transfer one file at a time and then update the prograss bar instead of trying to do it all at one in a while loop.

Does anyone else have any ideas on how I could do this?
DevilB is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-20-2006, 01:24 PM
Junior Talker

Posts: 14
Trades: 0
Have you tried using ajax to ask the server the status of the transfer, and have the server return that value to a javascript variable? Then you can use that value for your progress bar.
__________________

Please login or register to view this content. Registration is FREE
- Find and post your favorite real-life places. (those are the ones that don't start with
Please login or register to view this content. Registration is FREE
briercan is offline
Reply With Quote
View Public Profile Visit briercan's homepage!
 
Old 12-27-2006, 12:47 AM
Ultra Talker

Posts: 406
Trades: 4
yup, using ajax will be the easiest method.

in your upload script, put a break in for every say 5% of the file size to do a return object back via the ajax variable, and update the DOM
briansol is offline
Reply With Quote
View Public Profile Visit briansol's homepage!
 
Reply     « Reply to ASP and JavaScript working together
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.50767 seconds with 12 queries