Jump to content

Rominall

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Rominall

  • Rank
    Newbie
  1. Ok, I think I'm SOL but is there a way to drop a mapped drive folder shortcut on a webpage so users can drop it on their desktop?
  2. Convert word docs w/ text boxes

    Not sure if this is the right forum but thought I'd start here. I have about 200 word documents that I need to convert to html but... All the documents have text boxes, that don't covert easily with anything I've tried. PDF conversion works but due to stuff out of my control they load really slowly and on refresh sometimes they fail to reload properly So, my ultimate goal (way down a deep dark tunnel of unforeseen restrictions) would be to have each 'section' of the word docs be part of a table and then load the pertinent cells when a specific page is called. For example the word docs have a header, a side bar, and four content sections. Each section might be the same for other documents so I want to rip out the duplication. IE. one doc might have a side bar of "Explanation of product features" which is also the same in 5 or 6 other documents. Content section one might be duplicated across 8-10 docs. I can create the HTML for the table and that's all good but does anyone have an easy way for me to convert the docs to something easy to use? I really don't want to have to go through 200 docs and pick them apart. Any guidance you could provide would be appreciated.
  3. XMLHtpsRequest IE vs. Chrome

    So, I am really confused. At first I thought my problem was because my server wouldn't support GET/POST but now I'm not so sure as Firefox can use the GET. My code works in Firefox but not IE9 or Chrome. <html><body><script>//var xhr = new XMLHttpRequest();//var parser = new DOMParser();//var doc = parser.parseFromString(xhr.responseText, 'text/xml');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","RepXML.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; document.write("<table border='1'>");var x=xmlDoc.getElementsByTagName("rep");for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("Rep")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("RepID")[0].childNodes[0].nodeValue); document.write("</td></tr>"); }document.write("</table>");</script></body></html> What's up? What do I need to check? I would love this to work in IE9+ as that is my audience's default browser.
  4. IE issue w/ XML - ?

    I'm not sure what the issue is so thought maybe you'd be able to help. I copied the examples from here - http://www.w3schools.com/xsl/xsl_client.asp onto my server. It runs just fine in FireFox but won't work in IE - I just get a blank page (no errors). I'm running IE9 and I've turned on compatibility. I've also checked my browser add-ons and I have the following (all enabled): XML DOM Document XSL Template XML DOM Document 4.0 XML Dom Document 6.0 XML HTTP 4.0 XML HTTP 6.0 XML DOM Document 3.0 XML HTTP 3.0 Free Threaded XML Dom Document Any ideas?
  5. clear <div> element

    I've got a webpage that pulls some XML tables. And at the top I want to have the user choose which page to load. the buttons work as is but if the buttons are clicked more than once the div that get's populated multiplies. So if they click button 1 then button 2 and button 2 and button 1 I get 4 tables on down the page.What I want to do is to clear the <div> element if it's not blank. Here's part of my function (duplicated for both buttons): function displayResultPS() { if (document.getElementById("example").value !=""){ document.getElementById("example").innerHtml = ""; } ...code that loads XML table that works } here's the HTML for the buttons and div: <input name="HC" id="HC" type="button" value="HC" onclick="displayResultHC()"> <input name="PS" id="PS" type="button" value="PS" onclick="displayResultPS()"> <div id="example" /> Why doesn't it work???
  6. new to XML/XSL

    Ok, I'm new to XML and XSL. Ultimately I want to populate this table with filters based on user input but thought I'd start with the whole table. Here's a portion of my XML file <?xml version="1.0" encoding="UTF-8" standalone="yes"?><?xml-stylesheet type="text/xsl" href="XSLstylesheet.xsl"?><data-set> <rep> <RepID>12345</RepID> <Rep>SomeName</Rep> <Dept>PS</Dept> <Station>1</Station> <ClassDate>41593</ClassDate> <Agency>AGency</Agency> <EmAppr>y</EmAppr> </rep> <rep> <RepID>98765</RepID> <Rep>Another Name</Rep> <Dept>HC</Dept> <Station>2</Station> <ClassDate>41593</ClassDate> <Agency>Next Agency</Agency> <EmAppr>y</EmAppr> </rep> ... </rep></data-set> Here's my XSL: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body> <h2>Representatives</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Rep</th> <th>Rep ID</th> <th>Department</th> <th>Station</th> <th>Start Date</th> <th>Agency</th> <th>Out of Approval Queue</th> </tr> <xsl:for-each select="data-set/rep"> <tr> <td><xsl:value-of select="data-set/Rep"/></td> <td><xsl:value-of select="data-set/RepID"/></td> <td><xsl:value-of select="data-set/Dept"/></td> <td><xsl:value-of select="data-set/Station"/></td> <td><xsl:value-of select="data-set/ClassDate"/></td> <td><xsl:value-of select="data-set/Agency"/></td> <td><xsl:value-of select="data-set/EmAppr"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet> When I run it, the table has the requesite rows but no data in the cells. ???? What did I do wrong?
  7. HTML -> Javascript

    thanks. but when I changed it, it still didn't work. function Submit1() { var x = document.getElementById("OTWOpt1"); var y = x.options[x.selectedIndex].value; alert(y)If y == 1 x.options[x.selectedIndex].text = "Wrong"elseIf y == 2 x.options[x.selectedIndex].text = "Right"} If I comment out the if else the alert works fine and returns the expected value. So it's something in the if/else statements. If I replace the if/else with this x.options[x.selectedIndex].text = "Yes" that works. So what is wrong with the if/else statement? I tried else and elseIf. ????? I'm soooo confused.
  8. HTML -> Javascript

    I have this code in my HTML page.<script> function init(){ document.getElementById('OTWOpt1').onchange=function() { if(this.value==2) {this.options[this.selectedIndex].text='Right'; } if(this.value==1) {this.options[this.selectedIndex].text='Wrong'; } } } window.addEventListener? window.addEventListener('load',init,false): window.attachEvent('onload',init); </script> I want to move it to it's own JS page but I'm having all kinds of problems getting it to work. I know how to do the onchange for the select object but the syntax doesn't seem to be working. I tried going this way:function Submit1() { var x = document.getElementById("OTWOpt1"); var y = OTWOpt1.options[x.selectedIndex].value; alert(y) If y == 1 OTWOpt1.options[OTWOpt1.selectedIndex].text = "Wrong" elseIf y == 2 OTWOpt1.options[OTWOpt1.selectedIndex].text = "Right"} But no dice.
  9. Select values and if then statements

    Well I feel stupid. THANKS!!!!!
  10. I have a table w/ 4 columns: col 1 = string; col 2 = selection w/ 5 options, col 3 = selection w/ 5 options, col 4 =button. I want to have the user select an option in both col 2 & 3 and then click the button to 'check' the options selected. Here's the HTML for the table <tr><td class="Prod">Product1</td> <select name="mySelect1"; onchange="ChckValue()"><option value="3">Choose</option><option value="1">$7.95</option><option value="1">$9.95</option><option value="2">$12.95</option><option value="1">$14.95</option></select> </td> <td class="Prod">Product2</td><select name="mySelect2"; onchange="ChckValue()"><option value="3">Choose</option><option value="1">$7.95</option><option value="1">$9.95</option><option value="2">$12.95</option><option value="1">$14.95</option></select> </td> <td class="ChkBtn"><button class="ChkBtn"; onclick="Validate(this)">Check</button></td> </tr> I'm doing this in stages so currently when they change a value in either select I want to make sure it's getting the right "value". However it seems to only be picking up a value of 1. Here's the Javascriptfunction ChckValue() {var selected = mySelect.options[mySelect.selectedIndex].value;if (selected = "1") { alert("The answer is wrong.")}else if (selected = "2"){ alert("The answer is right.")} } I've tried the selected = with and without quotes. Is it something like I can't have the same 'value' for multiple options? This is for a quiz so it's be nice if I could have multiple 'wrong' values and not have to distinguis the wrong values. Any help???
×