Guest User

Untitled

a guest
May 15th, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  2.   }
  3. xmlhttp.open("GET","gallery.xml",false);
  4. xmlhttp.send();
  5. xmlDoc=xmlhttp.responseXML;
  6. x=xmlDoc.getElementsByTagName("PHOTO");
  7. y=xmlDoc.getElementsByTagName("MOVIE");
  8. j=0;
  9. i=0;
  10. function displayPHOTO()
  11. {
  12. srcp=(x[i].getElementsByTagName("SRCP")[0].childNodes[0].nodeValue);
  13. titlep=(x[i].getElementsByTagName("TITLEP")[0].childNodes[0].nodeValue);
  14. widthp=(x[i].getElementsByTagName("WIDTHP")[0].childNodes[0].nodeValue);
  15. heightp=(x[i].getElementsByTagName("HEIGHTP")[0].childNodes[0].nodeValue);
  16. txtp="<img src='"+srcp+"'alt='"+titlep+"' width='"+widthp+"' height='"+heightp+"'/><br />תיאור:" + titlep;
  17. document.getElementById("showPHOTO").innerHTML=txtp;
  18. }
  19. function displayMOVIE()
  20. {
  21. srcm=(y[j].getElementsByTagName("SRCM")[0].childNodes[0].nodeValue);
  22. titlem=(y[j].getElementsByTagName("TITLEM")[0].childNodes[0].nodeValue);
  23. widthm=(y[j].getElementsByTagName("WIDTHM")[0].childNodes[0].nodeValue);
  24. heightm=(y[j].getElementsByTagName("HEIGHTM")[0].childNodes[0].nodeValue);
  25. txtm="<iframe width='"+widthm+"' height='"+heightm+"' src='"+srcm+"' frameborder='0' allowfullscreen/></iframe><br />תיאור:" + titlem;
  26. document.getElementById("showMOVIE").innerHTML=txtm;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment