![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Vista Home Premium | problem download HTML in JavaScript //*********************** // Test of downloading HTML DOM object // Gets title OK as shown // Does not get title if WScript.echo is commented out // running on VISTA Home Premium Service Pack 1 //*********************** var fso; fso = new ActiveXObject("Scripting.FileSystemObject"); var logFile = fso.CreateTextFile("logTestHTML.txt", true); var URL; var domHtml; URL = "http://google.com"; logFile.writeLine("getting HTML: " + URL); domHtml= WScript.getObject(URL); WScript.echo("got HTML"); logFile.writeLine("title: " + domHtml.title); |
My System Specs![]() |
| | #2 (permalink) |
| | Re: problem download HTML in JavaScript You didn't notice that the newsgroup name says "vbscript"? For javascript you need to ask in the javascript group. Quote: > // Test of downloading HTML DOM object > // Gets title OK as shown > // Does not get title if WScript.echo is commented out > // running on VISTA Home Premium Service Pack 1 > file://*********************** > > var fso; > fso = new ActiveXObject("Scripting.FileSystemObject"); > var logFile = fso.CreateTextFile("logTestHTML.txt", true); > var URL; > var domHtml; > URL = "http://google.com"; > logFile.writeLine("getting HTML: " + URL); > domHtml= WScript.getObject(URL); > WScript.echo("got HTML"); > logFile.writeLine("title: " + domHtml.title); > > > -- > captain kris |
My System Specs![]() |
| | #3 (permalink) |
| Vista Home Premium | Re: problem download HTML in JavaScript Sorry posted wrong script - I tried both scripting languages '//*********************** '// Test of downloading HTML DOM object '// Gets title OK as shown '// Does not get title if WScript.echo is commented out '// running on VISTA Home Premium Service Pack 1 '//*********************** dim fso Set fso = CreateObject("Scripting.FileSystemObject") dim logFile Set logFile = fso.CreateTextFile("logTestHTML.txt", true) dim URL dim domHtml 'Set URL = "http://google.com" logFile.writeLine("getting HTML: http://google.com") Set domHtml= WScript.getObject("http://google.com") WScript.echo("got HTML") logFile.writeLine("title: " & domHtml.title) |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| problem download HTML in VBScript | VB Script | |||
| Internet Explorer Problem *HELP* Maybe a Javascript problem | Browsers & Mail | |||
| Seeking CSS, Javascript, HTML, PHP editor component.... | .NET General | |||
| FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADOVBScript, SAP - ABAP and more... | Vista General | |||
| Download ASPX wiki pages as HTML | PowerShell | |||