...

View Full Version : ASP and JavaScript working together



Mosqwik
10-04-2007, 09:02 AM
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?

Daemonspyre
10-04-2007, 01:12 PM
Look at ASPUpload' Progress Bar.

While you do not need to use their software, they have an ASP and JS 'progress bar' that works well for both IE and FF.

Also - JS is ALWAYS client-side, not just in your case. :)

nikkiH
10-04-2007, 02:04 PM
JS is ALWAYS client-side

What do you call server-side javascript, then? JScript?

Daemonspyre
10-04-2007, 03:25 PM
JScript is M$'s version of JavaScript, with some non-standard M$ crap put into it as well as the ability to embed code into pages.

( I'm an ASP programmer and I still hate M$. Go figure... =| )

What is commonly referred to as JavaScript is technically Mozilla/Netscape's implementation of the ECMA Scripting language.

There are 3 versions of "JavaScript": Client-side [CS], Core, and Server-side [SS].

CS tracks the effect a user has on a web page.

Core includes the functions, variables, and LiveConnect, the tool used to connect CS <- Core -> SS.

SS JS is embedded EXECUTABLES, known as bytecode executable files.

So, yeah, I guess it would be called JScript. :)

nikkiH
10-04-2007, 06:41 PM
I'm an ASP programmer and I still hate M$. Go figure... =|

Well, I code mostly in .NET and I hate them too. LOL

Awhile back there used to be server-side javascript for Netscape Enterprise Server as well, but it's been awhile since I've worked with Unix, so I don't know if that's still around.

I think some programs, such as Adobe, even have their own version of javascript implemented to interact with their objects. Way to confuse people, eh? :D

Daemonspyre
10-04-2007, 07:35 PM
Don't get me started on ActionScript and Flash.... I love designing in Flash and it's ability to do some really cool stuff, but do I really have to learn another version of *Script?? I think that I am up to 4 (JavaScript, JScript, ActionScript, VBScript).

...blech...

And I just noticed how totally OT this has become... Mosqwik - I hope we answered your question... :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum