Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page contentType="text/html; charset=utf-8" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html lang="he" dir="rtl">
- <head>
- <title>תמונות וסרטונים</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
- <link rel="shortcut icon" href="images/favicon.ico" />
- <script type="text/javascript">
- if (window.XMLHttpRequest)
- {// code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp=new XMLHttpRequest();
- }
- else
- {// code for IE6, IE5
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.open("GET","gallery.xml",false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- x=xmlDoc.getElementsByTagName("PHOTO");
- y=xmlDoc.getElementsByTagName("MOVIE");
- j=0;
- i=0;
- function displayPHOTO()
- {
- srcp=(x[i].getElementsByTagName("SRCP")[0].childNodes[0].nodeValue);
- titlep=(x[i].getElementsByTagName("TITLEP")[0].childNodes[0].nodeValue);
- widthp=(x[i].getElementsByTagName("WIDTHP")[0].childNodes[0].nodeValue);
- heightp=(x[i].getElementsByTagName("HEIGHTP")[0].childNodes[0].nodeValue);
- txtp="<img src='"+srcp+"'alt='"+titlep+"' width='"+widthp+"' height='"+heightp+"'/><br />תיאור:" + titlep;
- document.getElementById("showPHOTO").innerHTML=txtp;
- }
- function displayMOVIE()
- {
- srcm=(y[j].getElementsByTagName("SRCM")[0].childNodes[0].nodeValue);
- titlem=(y[j].getElementsByTagName("TITLEM")[0].childNodes[0].nodeValue);
- widthm=(y[j].getElementsByTagName("WIDTHM")[0].childNodes[0].nodeValue);
- heightm=(y[j].getElementsByTagName("HEIGHTM")[0].childNodes[0].nodeValue);
- txtm="<iframe width='"+widthm+"' height='"+heightm+"' src='"+srcm+"' frameborder='0' allowfullscreen/></iframe><br />תיאור:" + titlem;
- document.getElementById("showMOVIE").innerHTML=txtm;
- }
- function nextp()
- {
- if (i<x.length-1)
- {
- i++;
- displayPHOTO();
- }
- }
- function previousp()
- {
- if (i>0)
- {
- i--;
- displayPHOTO();
- }
- }
- function nextm()
- {
- if (j<y.length-1)
- {
- j++;
- displayMOVIE();
- }
- }
- function previousm()
- {
- if (j>0)
- {
- j--;
- displayMOVIE();
- }
- }
- </script>
- </head>
- <body onload="displayPHOTO(); displayMOVIE();">
- <div id="container">
- <jsp:include page="navbar.jsp"></jsp:include>
- <h1><u>הגלרייה</u></h1>
- <h2><u>תמונות מהמשחק:</u></h2>
- <div id='showPHOTO'></div>
- <input type="button" onclick="previousp()" value="<<" />
- <input type="button" onclick="nextp()" value=">>" />
- <h2><u>סרטונים מהמשחק:</u></h2>
- <div id='showMOVIE'></div>
- <input type="button" onclick="previousm()" value="<<" />
- <input type="button" onclick="nextm()" value=">>" />
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment