Click here to Skip to main content
15,887,872 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWill the static get accessor of a property be cached ? Pin
Nadia Monalisa4-Jan-12 16:25
Nadia Monalisa4-Jan-12 16:25 
AnswerRe: Will the static get accessor of a property be cached ? Pin
jkirkerx6-Jan-12 7:11
professionaljkirkerx6-Jan-12 7:11 
GeneralRe: Will the static get accessor of a property be cached ? Pin
Nadia Monalisa6-Jan-12 10:30
Nadia Monalisa6-Jan-12 10:30 
GeneralRe: Will the static get accessor of a property be cached ? Pin
jkirkerx6-Jan-12 11:02
professionaljkirkerx6-Jan-12 11:02 
Questiononline service provider regarding sale/purchase services like advocay etc Pin
adnan safdar4-Jan-12 1:17
adnan safdar4-Jan-12 1:17 
AnswerRe: online service provider regarding sale/purchase services like advocay etc Pin
Richard MacCutchan4-Jan-12 2:46
mveRichard MacCutchan4-Jan-12 2:46 
AnswerRe: online service provider regarding sale/purchase services like advocay etc Pin
jkirkerx6-Jan-12 7:43
professionaljkirkerx6-Jan-12 7:43 
QuestionUsing Uploadify In Custom Server Control Pin
Richard Blythe2-Jan-12 16:21
Richard Blythe2-Jan-12 16:21 
I'm developing an Asp.Net image placeholder control. When the user hovers the mouse over the image, a toolbar fades in at the top and give the user the option to: upload a different image, change the comments for the image, or revert back to the default avatar.

I've based the upload control on Uploadify. Everything about this control is working great except one problem.

Explanation: When the image is first loaded on the page, the embedded toolbar's css sets the display to: none. Once the user hovers over the image, the toolbar containing the Uploadify control is faded in using jQuery: '.fadeIn()'. After the upload, on the onAllComplete event, the toolbar is faded out using jQuery: 'fadeOut()',

Problem: Uploadify does not perform uploads after the first initial upload "when the .fadeOut() method is called on the the toolbar!

If the container remains visible, uploads execute just fine. By the way, the .fadeIn(), .fadeOut() methods can be called "before" any uploads, and there is no error. The culprit seems to be the "post upload" .fadeOut() method.

Can anyone help with this issue? I can simply embed the toolbar as a permanent fixture to the image placeholder, but it has a much more professional appeal with the fade effects.

Here some bare bones code that will re-create the problem:

HTML
//------------  HTML Header Code  -----------------------------

<script src="jquery-1.6.2.js" type="text/javascript"></script>     
<script src="jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>     
<script src="swfobject.js" type="text/javascript"></script>      
<script type="text/javascript">         
$(document).ready(function() {             
$('#file_upload').uploadify({                 
'uploader': '/uploadify.swf',                 
'script': '/Handler1.ashx',                
 'folder': '/uploads',                 
'onAllComplete': function() {                     
if (window.frozenImageEditorToolBar) {                         
$(window.frozenImageEditorToolBar).removeAttr('freeze');                         $(window.frozenImageEditorToolBar).fadeOut();                        
 window.frozenImageEditorToolBar = false;                     
}                 
}            
});              

$('#container').mouseenter(function() {                 
$('#toolbar').fadeIn();             
});             
 $('#container').mouseleave(function() {                
 if (!$('#toolbar').hasAttr('freeze'))                     
$('#toolbar').fadeOut();             
});              
$('#toolbar').mousedown(function(e) {                 
$(this).attr('freeze', '1');                 
window.frozenToolBar = $(this);                 
//prevent container.mouseleave() from fading out the toolbar                 
//until the upload is complete. (see onAllComplete)             
});          
});          
(function($) {             
$.fn.hasAttr = function(attribute) {                 
var attr = this.attr(attribute);                 
return (typeof attr !== 'undefined' && attr !== false);             
}         
})(jQuery);      
</script>      
       

//-------- HTML Body Code --------
<div id="container" style="height: 150px; width: 250px; background-color: #6699FF;">         
<div id="toolbar" style="background-color: #C0C0C0; display: none;">             
<input id="file_upload" type="file" />         
</div>     
</div>

Be nice to your kids. They'll choose your nursing home.

My Articles
   Developer's Best Friend

AnswerRe: Using Uploadify In Custom Server Control Pin
jkirkerx6-Jan-12 7:22
professionaljkirkerx6-Jan-12 7:22 
QuestionHow to load TabControl with many of objects and tabs FASTER Pin
satrio_budidharmawan1-Jan-12 21:02
satrio_budidharmawan1-Jan-12 21:02 
AnswerRe: How to load TabControl with many of objects and tabs FASTER Pin
manognya kota6-Jan-12 2:03
manognya kota6-Jan-12 2:03 
Questionransfer data from one page to another Pin
Enobong Adahada30-Dec-11 0:13
Enobong Adahada30-Dec-11 0:13 
AnswerRe: ransfer data from one page to another Pin
thatraja30-Dec-11 0:54
professionalthatraja30-Dec-11 0:54 
AnswerRe: ransfer data from one page to another Pin
mahmoud mohammed mansor31-Dec-11 1:23
mahmoud mohammed mansor31-Dec-11 1:23 
GeneralRe: ransfer data from one page to another Pin
syamrulezzz5-Jan-12 22:20
syamrulezzz5-Jan-12 22:20 
AnswerRe: ransfer data from one page to another Pin
Jitendra Parida - Jeetu3-Jan-12 1:28
Jitendra Parida - Jeetu3-Jan-12 1:28 
QuestionListview with Search and DataPager controls Pin
ylsv29-Dec-11 5:05
ylsv29-Dec-11 5:05 
Questioncalendar extender not working in black berry phone os 4.6 and above Pin
vishnukamath28-Dec-11 21:19
vishnukamath28-Dec-11 21:19 
Questionmergetags in a web application Pin
MalarGayu28-Dec-11 13:58
MalarGayu28-Dec-11 13:58 
Questionadding item in listbox using delegate Pin
jhyn27-Dec-11 22:38
jhyn27-Dec-11 22:38 
AnswerRe: adding item in listbox using delegate Pin
Barbo28-Dec-11 4:54
Barbo28-Dec-11 4:54 
GeneralRe: adding item in listbox using delegate Pin
jhyn28-Dec-11 16:39
jhyn28-Dec-11 16:39 
QuestionProblem in run website Pin
Jitendra Parida - Jeetu26-Dec-11 20:35
Jitendra Parida - Jeetu26-Dec-11 20:35 
AnswerRe: Problem in run website Pin
thatraja26-Dec-11 21:09
professionalthatraja26-Dec-11 21:09 
Questionhow to remove session when browser closed. Pin
uspatel25-Dec-11 23:14
professionaluspatel25-Dec-11 23:14 

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.