By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,526 Members | 1,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,526 IT Pros & Developers. It's quick & easy.

Dynamically changing DIV tag's CSS propertie

P: 17
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.
Dec 17 '08 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 392
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.
Dec 17 '08 #2

P: 17
Hi Pronerd,
Thanks for reply,
I am pasting the code below
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('videoTd').className='popped';
  2.  
  3. document.getElementById('mapexpand').innerHTML='Collapse';
  4.  
  5. var elementVar=document.getElementById('videoTd');
  6.  
  7. Drag.init(elementVar);
  8.  
  9. elementVar.style.position='absolute';
  10.  
  11. elementVar.style.left=(document.body.offsetWidth/2)-240+"px";
  12.  
  13. elementVar.style.top=(document.body.offsetHeight/2)-175+"px";
  14.  
  15. elementVar.style.zIndex=40000;
  16.  
  17. document.getElementById("synctable").className="syncxpand";
  18.  
  19. document.getElementById('mapTd').height=document.body.offsetHeight-270+"px";
  20.  
  21. document.getElementById('map').style.height=document.body.offsetHeight-270+"px";
  22.  
  23. document.getElementById('mapleft').style.display="none";
  24.  
  25. document.getElementById('mapright').style.display="none";
  26.  
  27. document.getElementById('videoTd').borderLeft="";
  28.  
  29. zoomToFitRoute();
  30.  
  31. document.getElementById('minvideo').style.display="block"; 
  32.  
  33. document.getElementById('maxvideo').style.display="none"; 
  34.  
  35. document.getElementById('minvideo').onclick=clearVideoTd; 
  36.  
  37.  
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.
Dec 19 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.