home *** CD-ROM | disk | FTP | other *** search
/ Beweegwijzer / beweegwijzer.iso / setup / _SETUP.1 / links.js < prev    next >
Encoding:
Text File  |  2000-04-15  |  1.7 KB  |  43 lines

  1. var chosenAlt = -1;
  2.  
  3. var moduleData = new ActiveXObject("Microsoft.XMLDOM");
  4. moduleData.load("data/links.xml");
  5. var moduleRoot = moduleData.documentElement;
  6.  
  7. function showPage() {
  8.   buildPage();
  9.   parent.goPage = 'achtergrond.html';  
  10.   AppScreen.style.visibility = "visible";
  11.   }
  12.  
  13. function buildPage() {
  14.   styleRule = '<?xml version="1.0"?>';
  15.   styleRule += '<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">';
  16.   styleRule += '<xsl:template match="/">';
  17.   styleRule += '<xsl:apply-templates select="links/text">';
  18.   styleRule += '<xsl:template>';
  19.   styleRule += '<xsl:copy>';
  20.   styleRule += '<xsl:apply-templates select="@* | * | comment() | pi() | text()"/>';
  21.   styleRule += '</xsl:copy>';
  22.   styleRule += '</xsl:template>';
  23.   styleRule += '</xsl:apply-templates>';
  24.   styleRule += '</xsl:template>';
  25.   styleRule += '</xsl:stylesheet>';
  26.  
  27.   style = new ActiveXObject("Microsoft.XMLDOM");
  28.   style.loadXML(styleRule);
  29.   
  30.   TextArea.innerHTML =  moduleData.transformNode(style);
  31.  
  32.   optieWriteString = '';
  33.   for (var i=0; i<moduleRoot.selectNodes("//optie").length; i++) {
  34.     optieWriteString += '<div id="LinkBtn" title="' + moduleRoot.selectNodes("//optie")[i].selectSingleNode("text").text + '" url="' + moduleRoot.selectNodes("//optie")[i].selectSingleNode("url").text + '" num="' + i + '" style="width:544px; top:'+ (i*21) +'px">';
  35.     optieWriteString += '<div id="AltText">' + moduleRoot.selectNodes("//optie")[i].selectSingleNode("text").text + '</div>';    
  36.     optieWriteString += '</div>';
  37.     }
  38.   OptieArea.innerHTML = optieWriteString; 
  39.   }
  40.  
  41. function showLink(theUrl) {
  42.   var showWindow = window.open(theUrl, 'show', 'width=630,height=400,scrollbars=yes,toolbar=yes');
  43.   }