Dynamically changing DIV tag's CSS propertie

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rakesh19
    New Member
    • Aug 2008
    • 17

    Dynamically changing DIV tag's CSS propertie

    Hi,
    I am having a div tag that has a SWF video player inside it. I dynamically change its position on click of a button to pop out as a absolutely positioned DIV in the center of the browser page with a high Z-Index. It works very well. But this activity refreshes that div, hence the video starts from beginning and not where it was popped out. Any method to retain the video position, not letting it reload innerHTML.

    Thanks in Advance.
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    That sounds like an issue with the plug-in/player not your JavaScript, but we can not really say for sure since you did not post the code you are asking about.

    You might try an IFrame tag instead of a div.

    Comment

    • rakesh19
      New Member
      • Aug 2008
      • 17

      #3
      Hi Pronerd,
      Thanks for reply,
      I am pasting the code below
      Code:
      document.getElementById('videoTd').className='popped';
      
      document.getElementById('mapexpand').innerHTML='Collapse';
      
      var elementVar=document.getElementById('videoTd');
      
      Drag.init(elementVar);
      
      elementVar.style.position='absolute';
      
      elementVar.style.left=(document.body.offsetWidth/2)-240+"px";
      
      elementVar.style.top=(document.body.offsetHeight/2)-175+"px";
      
      elementVar.style.zIndex=40000;
      
      document.getElementById("synctable").className="syncxpand";
      
      document.getElementById('mapTd').height=document.body.offsetHeight-270+"px";
      
      document.getElementById('map').style.height=document.body.offsetHeight-270+"px";
      
      document.getElementById('mapleft').style.display="none";
      
      document.getElementById('mapright').style.display="none";
      
      document.getElementById('videoTd').borderLeft="";
      
      zoomToFitRoute();
      
      document.getElementById('minvideo').style.display="block"; 
      
      document.getElementById('maxvideo').style.display="none"; 
      
      document.getElementById('minvideo').onclick=clearVideoTd;
      The videoo player is inside a div tag which is inside a td of a table. I move it out to the center of the browser as a popup div having a hight zIndex.

      Comment

      Working...