ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 2nd, 2005, 01:55 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Angry Showing a animated gif while file is being uploaded

I have a problem. I have a button on my asp.net form (using vb.net) is used to upload a file to the server when the buttons click event is activated. I am trying to make a animated gif show before the file is uploaded (at the begaining of the click event) and then I want to hide it at the end of the click event after the file has been uploaded. I am using a image control.

For example the code works something like this

imgControl.visible = true

'CODE TO UPLOAD FILE HERE

imgControl.visible = false

The problem is that the image control is not showing until the end of the procedure.(provided i leave out the code to hide it). By that time the file has already been uploaded.

Please Advise.

Reply With Quote
  #2  
Old March 8th, 2005, 04:04 AM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
So the image gets visible AFTER the uploading? and then directly hided? or am I wrong...

Have u tryed to buildin a sleep (or wait) between showing and uploading? that might work...

Reply With Quote
  #3  
Old March 8th, 2005, 08:26 AM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 14
Probably a stupid way to go..but since we're brainstorming...
why not making the upload code depend on the status of the image? that is:
if(imgContro... == true) upload the file....

Your way is obviously better, and so is AB_Jeroen...but, if nothing works...give it a shot, right?

(I don't know a bloody thing about .NET, so I'm just using my poorly developed common sense)

Reply With Quote
  #4  
Old March 8th, 2005, 08:44 AM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
I dont hink that you can view an image while uploading in the same window,

you might solve this by creating a popupwindow (javascript) with an animated image in that window , not the uploadwindow

Reply With Quote
  #5  
Old March 8th, 2005, 09:17 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Quote:
Originally Posted by AB_Jeroen
So the image gets visible AFTER the uploading? and then directly hided? or am I wrong...

Have u tryed to buildin a sleep (or wait) between showing and uploading? that might work...


No, I only want the animated image to show while the image is being uploaded. After the upload is completed it should not be shown or if it is it should not be spinning.

Reply With Quote
  #6  
Old March 8th, 2005, 09:21 AM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
I know that, but I was describing your problem, I gues that you DONT want it AFTER the upload, and that is exactly what happens.. am I right?

(consider my last post #4)

Reply With Quote
  #7  
Old March 8th, 2005, 09:27 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Quote:
Originally Posted by AB_Jeroen
I know that, but I was describing your problem, I gues that you DONT want it AFTER the upload, and that is exactly what happens.. am I right?

(consider my last post #4)


Oops sorry Yes, the image is showing after the file is uploaded. I need to get it to work WHILE the file is being uploaded and then to hide when it is all done.

Reply With Quote
  #8  
Old March 8th, 2005, 09:33 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Question

Quote:
Originally Posted by AB_Jeroen
So the image gets visible AFTER the uploading? and then directly hided? or am I wrong...

Have u tryed to buildin a sleep (or wait) between showing and uploading? that might work...


How would this work.....

Reply With Quote
  #9  
Old March 8th, 2005, 09:44 AM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
well, in the beginning I thought that the image didnt had time enough to completly load itself, before u went uploading

u can build in a timer with this code:
Code:
<%
Sub TLdelaySec(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>


<% TLdelaySec(2) %> 


but I think you can better put in a popup window (javascript) as I told you after my post of Delay..

this one should be a better solution -->
Quote:

you might solve this by creating a popupwindow (javascript) with an animated image in that window , not the uploadwindow

Reply With Quote
  #10  
Old March 8th, 2005, 01:02 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
How do I create the popup window? I have never used JavaScript before in my code.

Reply With Quote
  #11  
Old March 8th, 2005, 01:20 PM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
creating an popup with javascript
<SCRIPT language=JavaScript1.2>
function popupmessage(URL, TITEL, BREED, HOOG, SCROLL)
{
popup= window.open (URL, TITEL, "location=1,toolbar=no,location=no,directories=no,s tatus=no,menubar=no,status=1,scrollbars=" + SCROLL + ",width=" + BREED + ",height=" + HOOG);
}
</SCRIPT>

how to call the function:
<a href="javascript:---popupmessage('uploadimage.asp', Uploading, 400, '200', 'no')">Watch the upload image<a>
*note: the linebetween javascript: and popup.. should be erased, but i encounterd come smilie problems..

or try these:
http://www.google.nl/search?hl=nl&q...create+popup&lr=

goodluck

Reply With Quote
  #12  
Old March 8th, 2005, 01:22 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Thank you so much I think i will go with this method....

Reply With Quote
  #13  
Old March 8th, 2005, 02:56 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
The popup form worked great. Now, my problem is that I need to have the actual code to do the upload. What would i need to do to utilize my code written in vb that I already wrote...

Reply With Quote
  #14  
Old March 8th, 2005, 03:27 PM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
Quote:
Originally Posted by troyvw
The popup form worked great. Now, my problem is that I need to have the actual code to do the upload. What would i need to do to utilize my code written in vb that I already wrote...

1. so your getting a nice popyp, well done
*You must realise that with the functions of SP2, most pc's have a popup blocker, and they might block your popup asswel!

2. Do you need a completely upload script? Then I really advise u to go and search for some scripts, I can guide you and tell some, but I wont just post my whole uploadsscripts

so just give it a try yourself...

Reply With Quote
  #15  
Old March 9th, 2005, 11:39 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Smile

Quote:
Originally Posted by AB_Jeroen
1. so your getting a nice popyp, well done
*You must realise that with the functions of SP2, most pc's have a popup blocker, and they might block your popup asswel!

2. Do you need a completely upload script? Then I really advise u to go and search for some scripts, I can guide you and tell some, but I wont just post my whole uploadsscripts

so just give it a try yourself...


No, I dont need you upload script I was just wondering how do I go ahead and take the VB code that I already wrote for the upload process and use it. It was in a code module under the button but now that I am using javascript I want wondering how I would still use this code. I am sorry these questions are extremly naive but I am new to ASP.

Reply With Quote
  #16  
Old March 10th, 2005, 01:12 AM
AB_Jeroen AB_Jeroen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 28 AB_Jeroen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 17 m 40 sec
Reputation Power: 0
well it might be a pronlem... the popup window doesn't now when 2 quit, he doen'st realize when the upload is done...
I guess this is end of the line 4 me cause that was my problem asswell, when I tried this

zow, any one else?

Reply With Quote
  #17  
Old March 10th, 2005, 12:46 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
OK Thanks for all you help ... I will keep looking

Reply With Quote
  #18  
Old March 10th, 2005, 02:44 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 14
Did you try what I suggested? It's perhaps not the most elegant solution, but I think it's worth it...don't you?

Reply With Quote
  #19  
Old March 10th, 2005, 03:41 PM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Red face

Quote:
Originally Posted by Anibal
Did you try what I suggested? It's perhaps not the most elegant solution, but I think it's worth it...don't you?


I do not quite understand what you mean

Reply With Quote
  #20  
Old March 11th, 2005, 10:41 AM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 14
It's the third post on this very topic! I came up with an idea...not the best, but worth trying! Check it out...see if it works...

Quote:
Originally Posted by troyvw
I do not quite understand what you mean

Reply With Quote
  #21  
Old March 11th, 2005, 11:32 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
oops sorry...I did try that to without sucess....

Reply With Quote
  #22  
Old March 11th, 2005, 01:38 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 14
Damn It!!!
We'll just have to keep it UP....

Quote:
Originally Posted by troyvw
oops sorry...I did try that to without sucess....

Reply With Quote
  #23  
Old March 28th, 2005, 10:14 AM
troyvw troyvw is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 18 troyvw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 11 sec
Reputation Power: 0
Still having a problem

Does anybody have any more suggestions? I am still dealing with this issue without much success.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Showing a animated gif while file is being uploaded


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap