Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

style.display = 'none'
  • It took me 4 hours to figure out what was wrong but I have a program where I change the display status of a ul from display = '' to display = none. Doesn't matter what ul I do, but once I run this line of code Uploadify won't upload anymore. If I bypass this line it works fine. I have been able to reproduce this every time. I gave you my toggle function for your reference but only one line cause the problem.


    function toggle_visibility(id,hset)
    {

    var er = document.getElementById(id);

    if(er)
    {
    if((er.style.display == '' && hset != "show") || hset == "none")
    {
    if(er.style.display == '')
    {
    BAD LINE --> er.style.display = 'none';
    }
    }
    else
    {
    er.style.display = '';
    }
    }
    return false;
    }
  • I don't understand. Are you saying the problem lies with uploadify or your code.
  • Well I use this code everywhere and have had no problems with it before but when it manipulates the DOM uplodify won't work anymore. I want to know why when the DOM is manipulated like this, uploadify can't run anymore?
  • When you hide a div that contains a flash movie, Flash effectively "shutsdown" the movie until it is shown again, where it will start it with a fresh listing. The problem with uploadify is:
    hiding it while uploads are going, flash will terminate the upload;
    and wether or not it is uploading, if items are in the queue flash will clear all variables, including the queue. It clears the queue without calling uploadify's queue clearing code and as a result will leave the html items in place. When a queue item is removed from the flash queue without first removing the html code you loose the ability to remove the queue item automatically.

    If you want to hide a div that contains a flash movie and still have it run, you need to set the height to 0 instead.

    Note that this is not a bug with uploadify but rather the way flash is programmed. Unfortunately we can't restore the upload queue.
  • so what is the reason when I use this to hide/show a ul that has nothing to do with the flash component?

    My basic example being


      HIDE ME







    ul.style.display = 'none';


    Seems to me this doesn't do anything to hide the flash file. Am I incorrect on this?
  • no idea. I hide elements all the time with uploadify on the same page. Although I do use jQuery to handle it.
  • maybe it doesn't reload the flash file.

    I use this for the flash to hide


    $('object').attr(\"style\", \"visibility: hidden\");


    or this to show

    $('object').attr(\"style\", \"visibility: visible\");


    of course if you have other flash files on page it might hide/show them as well so ad id if that's the case.
  • daveznspace said:
    maybe it doesn't reload the flash file.

    I use this for the flash to hide


    $('object').attr(\"style\", \"visibility: hidden\");


    or this to show

    $('object').attr(\"style\", \"visibility: visible\");


    of course if you have other flash files on page it might hide/show them as well so ad id if that's the case.



    $('object').attr("style", "visibility: hidden");
    It can not be hidden the flash button~~ any other way?
  • I've the smae problem !