Click here to Skip to main content
15,879,326 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionHow to override .js file Pin
Member 129321392-Jan-17 22:26
Member 129321392-Jan-17 22:26 
QuestionPopup div Pin
Otekpo Emmanuel25-Dec-16 3:00
Otekpo Emmanuel25-Dec-16 3:00 
AnswerRe: Popup div Pin
Afzaal Ahmad Zeeshan25-Dec-16 3:41
professionalAfzaal Ahmad Zeeshan25-Dec-16 3:41 
GeneralRe: Popup div Pin
Otekpo Emmanuel25-Dec-16 4:42
Otekpo Emmanuel25-Dec-16 4:42 
GeneralRe: Popup div Pin
Afzaal Ahmad Zeeshan25-Dec-16 4:47
professionalAfzaal Ahmad Zeeshan25-Dec-16 4:47 
QuestionRe: Popup div Pin
ZurdoDev28-Dec-16 3:32
professionalZurdoDev28-Dec-16 3:32 
AnswerRe: Popup div Pin
ZurdoDev25-Jan-17 9:02
professionalZurdoDev25-Jan-17 9:02 
QuestionJavaScript Uncaught ReferenceError: WScript is not defined Pin
Member 1291970223-Dec-16 10:00
Member 1291970223-Dec-16 10:00 
Hi All,

I have a script which downloads the file from the server. Its was working fine, but its throwing error now.
I am getting error while creating the object using WScript.
please let me know how to fix this issue.


C#
<html>
<head>
<script Language ="Javascript">
var userId = "fm012097";
window.alert(userId)

//var password = "oogief#";
var password = "Bllchr1$";
window.alert(password)

var localDirectory = "c:\\temp";

window.alert(localDirectory)

var oHDL = WScript.CreateObject( "DSTHTTPDL.DownloadManager" );

oHDL.Host     = "xyz.com";
oHDL.Target   = "/sample";
alert(oHDL.Target)
oHDL.Client   = "415171403";
oHDL.UseProxy = false;
oHDL.UseHttps = true;
oHDL.Asynchronous = false;
oHDL.UserID = userId;
oHDL.Password = password;
oHDL.LocalDirectory = localDirectory;

window.alert(oHDL)

var fileListing = oHDL.GetFileListAsXML();
window.alert(fileListing)

var xmldoc = WScript.CreateObject( "Msxml2.DOMDocument.4.0" );
xmldoc.async = false;
xmldoc.preserveWhiteSpace = true;
xmldoc.loadXML( fileListing );


var dListing = "";

var docelement = xmldoc.documentElement;
window.alert(docelement)
var iCount = 0;


if ( docelement.hasChildNodes() )
{
    var nodeList = docelement.childNodes;
    var node = nodeList.nextNode();

    while ( node != null )
    {
        var file = node.getAttribute( "name" );
        var display = node.getAttribute( "short-name" );
        window.alert(file+''+display)
        dListing += file;
        dListing += ";";
        iCount++;

        node = nodeList.nextNode();
    }
}

oHDL.DownloadFiles( dListing ) 

oHDL = null;


</script>
</head>

</html>

AnswerRe: JavaScript Uncaught ReferenceError: WScript is not defined Pin
Afzaal Ahmad Zeeshan24-Dec-16 8:08
professionalAfzaal Ahmad Zeeshan24-Dec-16 8:08 
AnswerRe: JavaScript Uncaught ReferenceError: WScript is not defined Pin
ZurdoDev27-Dec-16 9:14
professionalZurdoDev27-Dec-16 9:14 
Questiondocument.referrer help Pin
sc1311118-Dec-16 22:17
sc1311118-Dec-16 22:17 
AnswerRe: document.referrer help Pin
Richard Deeming19-Dec-16 2:42
mveRichard Deeming19-Dec-16 2:42 
QuestionFunction to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Sathiya moorthi17-Dec-16 1:55
Sathiya moorthi17-Dec-16 1:55 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Richard MacCutchan17-Dec-16 1:57
mveRichard MacCutchan17-Dec-16 1:57 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Kornfeld Eliyahu Peter17-Dec-16 6:03
professionalKornfeld Eliyahu Peter17-Dec-16 6:03 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Afzaal Ahmad Zeeshan17-Dec-16 6:04
professionalAfzaal Ahmad Zeeshan17-Dec-16 6:04 
QuestionTwo way binding in AngularJS Pin
Member 1110597416-Dec-16 4:50
Member 1110597416-Dec-16 4:50 
AnswerRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 3:54
professionalNathan Minier21-Dec-16 3:54 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597421-Dec-16 4:30
Member 1110597421-Dec-16 4:30 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 4:44
professionalNathan Minier21-Dec-16 4:44 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597421-Dec-16 4:57
Member 1110597421-Dec-16 4:57 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 5:12
professionalNathan Minier21-Dec-16 5:12 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597422-Dec-16 4:40
Member 1110597422-Dec-16 4:40 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier23-Dec-16 1:01
professionalNathan Minier23-Dec-16 1:01 
Questionnpm install is giving error that project.json file doesn't exist even it exists Pin
indian1435-Dec-16 7:35
indian1435-Dec-16 7:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.