Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         // Grab the array of images from the XML document.
  2.         var xmlDoc = xmlhttpobject.responseXML;
  3.         var ListItems = xmlDoc.getElementsByTagName("z:row")||xmlDoc.getElementsByTagNameNS("*","row");
  4.        
  5.         // Select a random item from the XMl.
  6.         var SelectedItem = Math.floor(Math.random() * ListItems.length);
  7.  
  8.         // Compile the URL which we'll use for the image.
  9.         PictureURL = "/" + ListItems[SelectedItem].getAttribute("ows_RequiredField");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement