Search Results

Search found 193 results on 8 pages for 'activexobject'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • new ActiveXObject('Word.Application') creates new winword.exe process when IE security does not allo

    - by Mark Ott
    We are using MS Word as a spell checker for a few fields on a private company web site, and when IE security settings are correct it works well. (Zone for the site set to Trusted, and trusted zone modified to allow control to run without prompting.) The script we are using creates a word object and closes it afterward. While the object exists, a winword.exe process runs, but it is destroyed when the word object is closed. If our site is not set in the trusted zone (Internet zone with default security level) the call that creates the word object fails as expected, but the winword.exe process is still created. I do not have any way to interact with this process in the script, so the process stays around until the user logs off (users have no way to manually destroy the process, and it wouldn't be a good solution even if they did.) The call that attempts to create the object is... try { oWordApplication = new ActiveXObject('Word.Application'); } catch(error) { // irrelevant code removed, described in comments.. // notify user spell check cannot be used // disable spell check option } So every time the page is loaded this code may be run again, creating yet another orphan winword.exe process. oWordApplication is, of course, undefined in the catch block. I would like to be able to detect the browser security settings beforehand, but I have done some searching on this and do not think that it is possible. Management here is happy with it as it is. As long as IE security is set correctly it works, and it works well for our purposes. (We may eventually look at other options for spell check functionality, but this was quick, inexpensive, and does everything we need it to do.) This last problem bugs me and I'd like to do something about it, but I'm out of ideas and I have other things that are more in need of my attention. Before I put it aside, I thought I'd ask for suggestions here...

    Read the article

  • ActiveXObject issue in javaScript

    - by shan.swf
    hi.. I wrote a javascript function in my html page to execute an .exe file. for this i used ActiveXObject. my function is: //~~~~~~~~~~~~~~~~~~~~~~~~~~~JavaScript~~~~~~~~~~~~~~~~ function openWin(url) { if (!document.all) { alert ("Available only with Internet Explorer."); return; } var ws = new ActiveXObject("WScript.Shell"); ws.Exec(url); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It works fine but there is a alert "An ActiveX control might be unsafe to interact with other parts of the page. Do you want to allow this interaction?" comes up to confirm. If i say YES only it will get loaded. Pls anyone help me on this how to avoid this pop-up coming every time when i reload my html page.

    Read the article

  • IE8 ActiveXObject problem

    - by Codeffect
    I want to use javascript to create a textfile, so I used : This Line of code : var fso = new ActiveXObject("Scripting.FileSystemObject"); Its working properly in IE6 but not in IE8. Any suggested solution?

    Read the article

  • Javascript Msxml2.XMLHTTP terminal server access denied

    - by Jeroen
    Hi, var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttpRequest.open("POST", "http://vat/_vti_bin/lists.asmx", false); How can I let this script work on a Terminal server? When I open it on my local pc, it works, but when I do the same thing in a browser on a Terminal server, I get Access Denied. I tried using ServerXMLHTTP, but then i get Cannot create automation object

    Read the article

  • IE 7 activex object (or xmlhttprequest?) open method using POST takes 20-30 seconds to return

    - by Toddeman
    i have a problem that only shows itself in IE7. its a simple ajax call. i got my object (accounting for the browser) so in 7 i SHOULD have an ActiveXObject. when i call open with POST, it takes 20-30 seconds to return. i am using a TON of GET calls to populate information and all of these work (finally, after some bug fixing), but i am NOT a web developer so much like the other bugs i had to fix, i figured i was just missing another IE anomaly. this is not a consistent bug either, which makes it harder to find for me. most times the POST functions like it does in Firefox or Chrome, but maybe 1 out of 4 or 5 will take 20-30 seconds to return. it DOES return correctly when it returns, it just takes a long time. am i missing something simple? or is there a smarter way for me to find out exactly what is going on (like the equivalent of the firebug 'net' tab for windows?).

    Read the article

  • AJAX Issue, Works in all browsers except IE

    - by Nik
    Alright, this code works in Chrome and FF, but not IE (which is to be expected). Does anyone see anything wrong with this code that would render it useless in IE? var waittime=400; chatmsg = document.getElementById("chatmsg"); room = document.getElementById("roomid").value; sessid = document.getElementById("sessid").value; chatmsg.focus() document.getElementById("chatwindow").innerHTML = "loading..."; document.getElementById("userwindow").innerHTML = "Loading User List..."; var xmlhttp = false; var xmlhttp2 = false; var xmlhttp3 = false; function ajax_read() { if(window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); if(xmlhttp.overrideMimeType){ xmlhttp.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4) { document.getElementById("chatwindow").innerHTML = xmlhttp.responseText; setTimeout("ajax_read()", waittime); } } xmlhttp.open('GET','methods.php?method=r&room=' + room +'',true); xmlhttp.send(null); } function user_read() { if(window.XMLHttpRequest){ xmlhttp3=new XMLHttpRequest(); if(xmlhttp3.overrideMimeType){ xmlhttp3.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp3=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp3) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp3.onreadystatechange = function() { if (xmlhttp3.readyState==4) { document.getElementById("userwindow").innerHTML = xmlhttp3.responseText; setTimeout("user_read()", 10000); } } xmlhttp3.open('GET','methods.php?method=u&room=' + room +'',true); xmlhttp3.send(null); } function ajax_write(url){ if(window.XMLHttpRequest){ xmlhttp2=new XMLHttpRequest(); if(xmlhttp2.overrideMimeType){ xmlhttp2.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp2) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp2.open('GET',url,true); xmlhttp2.send(null); } function submit_msg(){ nick = document.getElementById("chatnick").value; msg = document.getElementById("chatmsg").value; document.getElementById("chatmsg").value = ""; ajax_write("methods.php?method=w&m=" + msg + "&n=" + nick + "&room=" + room + "&sessid=" + sessid + ""); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } var intUpdate = setTimeout("ajax_read()", waittime); var intUpdate = setTimeout("user_read()", 0);

    Read the article

  • Dual AJAX Requests at different times

    - by Nik
    Alright, I'm trying to make an AJAX Chat system that polls the chat database every 400ms. That part is working, the part of which isn't is the Active User List. When I try to combine the two requests, the first two requests are made, then the whole thing snowballs and the usually timed (12 second) Active User List request starts updating every 1ms and the first request NEVER happens again. Displayed is the entire AJAX code for both requests: var waittime=400;chatmsg=document.getElementById("chatmsg"); room = document.getElementById("roomid").value; chatmsg.focus() document.getElementById("chatwindow").innerHTML = "loading..."; document.getElementById("userwindow").innerHTML = "Loading User List..."; var xmlhttp = false; var xmlhttp2 = false; var xmlhttp3 = false; function ajax_read(url) { if(window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); if(xmlhttp.overrideMimeType){ xmlhttp.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4) { document.getElementById("chatwindow").innerHTML = xmlhttp.responseText; setTimeout("ajax_read('methods.php?method=r&room=" + room +"')", waittime); } } xmlhttp.open('GET',url,true); xmlhttp.send(null); } function user_read(url) { if(window.XMLHttpRequest){ xmlhttp3=new XMLHttpRequest(); if(xmlhttp3.overrideMimeType){ xmlhttp3.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp3=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp3) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp3.onreadystatechange = function() { if (xmlhttp3.readyState==4) { document.getElementById("userwindow").innerHTML = xmlhttp3.responseText; setTimeout("ajax_read('methods.php?method=u&room=" + room +"')", 12000); } } xmlhttp3.open('GET',url,true); xmlhttp3.send(null); } function ajax_write(url){ if(window.XMLHttpRequest){ xmlhttp2=new XMLHttpRequest(); if(xmlhttp2.overrideMimeType){ xmlhttp2.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp2) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp2.open('GET',url,true); xmlhttp2.send(null); } function submit_msg(){ nick = document.getElementById("chatnick").value; msg = document.getElementById("chatmsg").value; document.getElementById("chatmsg").value = ""; ajax_write("methods.php?method=w&m=" + msg + "&n=" + nick + "&room=" + room + ""); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } var intUpdate = setTimeout("ajax_read('methods.php')", waittime); var intUpdate = setTimeout("user_read('methods.php')", waittime);

    Read the article

  • How to import org.codehaus.groovy.scriptom.* on Groovy?

    - by Mulone
    Hi guys, I'm trying to run a Groovy app to manipulate Excel files on STS (by SpringSource) 2.3.0. My Groovy version is 1.7. Class: package com.mytool import org.codehaus.groovy.scriptom.ActiveXObject /** * @author Mulone * */ class SurveyTool { static main(args) { print 'test' def wshell = new ActiveXObject('Wscript.Shell') wshell.popup("Scriptom is Groovy") } } Sadly, this is what I get: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: C:\workspace\SurveyTool\src\com\geoadapta\surveytool\SurveyTool.groovy: 6: unable to resolve class org.codehaus.groovy.scriptom.ActiveXObject @ line 6, column 1. import org.codehaus.groovy.scriptom.ActiveXObject ^ 1 error I also tried to rename ActiveXObject to ActiveXProxy with the same result. I tried to import scriptom manually from the package scriptom-all-assembly-1.6.0 but I didn't work. Any idea? Cheers

    Read the article

  • Google Web Toolkit Deferred Binding Issue

    - by snctln
    I developed a web app using GWT about 2 years ago, since then the application has evolved. In its current state it relies on fetching a single XML file and parsing the information from it. Overall this works great. A requirement of this app is that it needs to be able to be ran from the filesystem (file:///..) as well as the traditional model of running from a webserver (http://...) Fetching this file from a webserver works exactly as expected using a RequestBuilder object. When running the app from the filesystem Firefox, Opera, Safari, and Chrome all behave as expected. When running the app from the filesystem using IE7 or IE8 the RequestBuilder.send() call fails, the information about the error suggests that there is a problem accessing the file due to violating the same origin policy. The app worked as expected in IE6 but not in IE7 or IE8. So I looked at the source code of RequestBuilder.java and saw that the actual request was being executed with an XMLHttpRequest GWT object. So I looked at the source code for XMLHttpRequest.java and found out some information. Here is the code (starts at line 83 in XMLHttpRequest.java) public static native XMLHttpRequest create() /*-{ if ($wnd.XMLHttpRequest) { return new XMLHttpRequest(); } else { try { return new ActiveXObject('MSXML2.XMLHTTP.3.0'); } catch (e) { return new ActiveXObject("Microsoft.XMLHTTP"); } } }-*/; So basically if an XMLHttpRequest cannot be created (like in IE6 because it is not available) an ActiveXObject is used instead. I read up a little bit more on the IE implementation of XMLHttpRequest, and it appears that it is only supported for interacting with files on a webserver. I found a setting in IE8 (Tools-Internet Options-Advanced-Security-Enable native XMLHTTP support), when I uncheck this box my app works. I assume this is because I am more of less telling IE to not use their implementation of XmlHttpRequest, so GWT just uses an ActiveXObject because it doesn't think the native XmlHttpRequest is available. This fixes the problem, but is hardly a long term solution. I can currently catch a failed send request and verify that it was trying to fetch the XML file from the filesystem using normal GWT. What I would like to do in this case is catch the IE7 and IE8 case and have them use a ActiveXObject instead of a native XmlHttpRequest object. There was a posting on the GWT google group that had a supposed solution for this problem (link). Looking at it I can tell that it was created for an older version of GWT. I am using the latest release and think that this is more or less what I would like to do (use GWT deferred binding to detect a specific browser type and run my own implementation of XMLHttpRequest.java in place of the built in GWT implementation). Here is the code that I am trying to use package com.mycompany.myapp.client; import com.google.gwt.xhr.client.XMLHttpRequest; public class XMLHttpRequestIE7or8 extends XMLHttpRequest { // commented out the "override" so that eclipse and the ant build script don't throw errors //@Override public static native XMLHttpRequest create() /*-{ try { return new ActiveXObject('MSXML2.XMLHTTP.3.0'); } catch (e) { return new ActiveXObject("Microsoft.XMLHTTP"); } }-*/; // have an empty protected constructor so the ant build script doesn't throw errors // the actual XMLHttpRequest constructor is empty as well so this shouldn't cause any problems protected XMLHttpRequestIE7or8() { } }; And here are the lines that I added to my module xml <replace-with class="com.mycompany.myapp.client.XMLHttpRequestIE7or8"> <when-type-is class="com.google.gwt.xhr.client.XMLHttpRequest"/> <any> <when-property-is name="user.agent" value="ie7" /> <when-property-is name="user.agent" value="ie8" /> </any> </replace-with> From what I can tell this should work, but my code never runs. Does anyone have any idea of what I am doing wrong? Should I not do this via deferred binding and just use native javascript when I catch the fail case instead? Is there a different way of approaching this problem that I have not mentioned? All replies are welcome.

    Read the article

  • Calling web service using javascript error

    - by politrok
    Hi , I try to call webservice using json , when i call to web service without excepted parameters , its work , but when i'm try to send parameter , ive got an error : This is my code: function GetSynchronousJSONResponse(url, postData) { var xmlhttp = null; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else if (window.ActiveXObject) { if (new ActiveXObject("Microsoft.XMLHTTP")) xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); else xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } url = url + "?rnd=" + Math.random(); // to be ensure non-cached version xmlhttp.open("POST", url, false); xmlhttp.setRequestHeader("Content-Type", "application/json; charset=utf-8"); xmlhttp.send(postData); var responseText = xmlhttp.responseText; return responseText; } function Test() { var result = GetSynchronousJSONResponse('http://localhost:1517/Mysite/Myservice.asmx/myProc', '{"MyParam":"' + 'test' + '"}'); result = eval('(' + result + ')'); alert(result.d); } This is the error : System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8. at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest What is wrong ? Thanks in advance .

    Read the article

  • AJAX problem-onreadystate does not work

    - by blackmage
    I am having a problem where my AJAX code does not get past the onreadtstate. The if( XMLHttpRequestObject) works fine, but the other part does not. The code is below: enter code here function getXmlHttpRequestObject() { if (window.XMLHttpRequest && !(window.ActiveXObject)) { XMLHttpRequestObject= new XMLHttpRequest(); return XMLHttpRequestObject; } else if (window.ActiveXObject) { try{ XMLHttpRequestObject=new ActiveXObject("Msxml2.XMLHTTP"); return XMLHttpRequestObject; }catch(exception1){ try{ XMLHttpRequestObject= new ActiveXObject("Microsoft.XMLHTTP"); return XMLHttpRequestObject; }catch(exception2){ }//end exception 2 }//end exception 1 }//end if else else{ document.getElementById('ajax_status').innerHTML='Status: Cound not create XmlHttpRequest Object.' + 'Consider upgrading your browser.'; } }//end function getXmlHttpRequestObject() { function loadJavascript( src, url ){ XMLHttpRequestObject=getXmlHttpRequestObject(); if( XMLHttpRequestObject){ //an alert will work here XMLHttpRequestObject.onreadystatechange = function() { alert("Here"); //Nothing at this pint works if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { includeJavaScript( sId, url, oXmlHttp.responseText ); } } } }//end LoadJavaScript Does anyone have an idea of what can be going wrong?

    Read the article

  • Filling in a form client-side [Javascript]

    - by Hawker
    I'm coding up a small Vista/7 sidebar gadget for our web based employee schedule system and I've run into a Javascript problem that my Google-FU can't solve. I can't figure out how to fill in a login form from the client. I'm creating a new ActiveXObject, navigating to the site, but lost as to where to go from here. var conn = new ActiveXObject("Microsoft.XMLHTTP"); conn.open("POST", "url", false); conn.send(null); Can access the form from the ActiveXObject based on the form id? I'd also assume I'm going to need to change a few headers for a POST vs. a GET? Thanks for any tips or links to references! I can't seem to find much and JavaScript isn't my forte.

    Read the article

  • What version will be chosen by MSXML2.XMLHTTP request, without version suffix? [migrated]

    - by jayarjo
    Probably every web developer is familiar with a pattern like this: var xmlHttp = null; if (window.XMLHttpRequest) { // If IE7, Mozilla, Safari, and so on: Use native object. xmlHttp = new XMLHttpRequest(); } else { if (window.ActiveXObject) { // ...otherwise, use the ActiveX control for IE5.x and IE6. xmlHttp = new ActiveXObject('MSXML2.XMLHTTP'); } } But the question is - if there are multiple MSXML versions available on the client's PC (let's say 3.0, 5.0, 6.0), which one of them will be chosen by MSXML2.XMLHTTP call (notice no version suffix at the end)? Will it be the latest or - not necessarily? And a side-question - is it possible to check which version was chosen?

    Read the article

  • Can you Download the cmid.ctt File

    - by ArtistDigital
    Can you Download the cmid.ctt File Zong.com.pk http://203.82.55.30/websms/default.aspx?txt_Msg=your-name&txt_MNumber=033489667417&txt_Nick=your-name Still Waiting for Reply.... kindly more Developer to broke the Server expection function alphanumeric(alphane) { var numaric = alphane; for(var j=0; j 47 && hh<59) || (hh 64 && hh<91) || (hh 96 && hh<123)) { } else { return false; } } return true; } function charscount(msg, frm) { frm.num_chars.value = 147 - msg.length; // m = msg; } function moveDivDown() { var el = document.getElementById("chatwindow") st = el.scrollTop; el.scrollTop = el.scrollTop + 300 } function trim(str) { return str.replace(/^\s*|\s*$/g,""); } var XMLHttp; var XMLHttp2; /SEND TO SERVER/ function GetXmlHttpObject() { var objXMLHttp=null /* if (window.XMLHttpRequest) { objXMLHttp=new XMLHttpRequest() } else if (window.ActiveXObject) { objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") }*/ var ua = navigator.userAgent.toLowerCase(); if (!window.ActiveXObject) objXMLHttp = new XMLHttpRequest(); else if (ua.indexOf('msie 5') == -1) objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP"); else objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); return objXMLHttp } function updateChatWindow() { var txt_Msg, txt_mNumber, txt_Nick, myMessage txt_MNumber = document.getElementById("txt_MNumber").value txt_Msg = document.getElementById("txt_Msg").value txt_Nick = document.getElementById("txt_Nick").value txt_Nick = trim (txt_Nick) if (txt_Nick.length==0) { alert ("Please enter the Nick Name") document.getElementById("txt_Nick").focus() document.getElementById("txt_Nick").value="" return false; } if (!alphanumeric(txt_Nick)) { alert ("Please enter a valid alphanumeric Nick Name") document.getElementById("txt_Nick").value="" document.getElementById("txt_Nick").focus() return false; } if (txt_Msg.length==0) return false; if (txt_MNumber.length != 10) { alert ("Please Enter a 10 digit recipient mobile number") return false } if (!IsNumeric (txt_MNumber)) { alert ("Please Enter a valid 10 digit recipient mobile number") return false } document.getElementById("txt_Msg").value = "" document.getElementById("num_chars").value = "147" document.getElementById("txt_Msg").focus() myMessage = '' +txt_Nick + ' Says: ' + txt_Msg + '' document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML + myMessage moveDivDown() XMLHttp = GetXmlHttpObject() if (XMLHttp==null) { alert ("Browser does not support HTTP Request") return false; } var url="default.aspx?" url=url+"txt_Msg="+txt_Msg url=url+"&txt_MNumber="+txt_MNumber url=url+"&txt_Nick="+txt_Nick url=url+"&sid="+Math.random() XMLHttp.onreadystatechange=stateChanged XMLHttp.open("GET",url,true) XMLHttp.send(null) return false; } function stateChanged() { if (XMLHttp.readyState==4 || XMLHttp.readyState=="complete") { try { document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML+ XMLHttp.responseText moveDivDown() } catch (e){} } } /RECEIVE FROM SERVER/ function checkResponse() { XMLHttp2 = GetXmlHttpObject() if (XMLHttp2==null) { alert ("Browser does not support HTTP Request") return } var url="" url=url+"?r=C" url=url+"&sid="+Math.random() XMLHttp2.onreadystatechange=stateChanged2 XMLHttp2.open("GET",url,true) XMLHttp2.send(null) } function stateChanged2() { if (XMLHttp2.readyState==4 || XMLHttp2.readyState=="complete") { try { document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML + XMLHttp2.responseText moveDivDown() } catch (e){} //Again Check Updates after 3 Seconds setTimeout("checkResponse()", 2000); } } function IsNumeric(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; }

    Read the article

  • XML cross-browser support

    - by 1anthony1
    I need help getting the file to run in Firefox: I have tried adapting scripts so that my file runs in both IE and Firefox but so far it still only works in IE. (The file can be tested at http://www.eyle.org/crosstest.html - simply type the word Mike in the text box using IE (doesn't work in Firefox).The HTML document is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> var xmlDoc; //loads xml using either IE or firefox function loadXmlDoc() { //test for IE if(window.ActiveXObject) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.load("books2.xml"); } //test for Firefox else if(document.implementation && document.implementation.createDocument) { xmlDoc = document.implementation.createDocument("","",null); xmlDoc.load("books2.xml"); } //if neither else {document.write("xml file did not load");} } //window.onload = loadXmlDoc(); var subject; //getDetails adds value of txtField to var subject in outputgroup(subject) function getDetails() { //either this or window.onload = loadXmlDoc is needed loadXmlDoc(); var subject = document.getElementById("txtField1").value; function outputgroup(subject) { var xslt = new ActiveXObject("Msxml2.XSLTemplate"); var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument"); var xslProc; xslDoc.async = false; xslDoc.resolveExternals = false; xslDoc.load("contains3books.xsl"); xslt.stylesheet = xslDoc; xslProc = xslt.createProcessor(); xslProc.input = xmlDoc; xslProc.addParameter("subj", subject); xslProc.transform(); document.write(xslProc.output); } outputgroup(subject); } </script> </head> <body> <input type="text" id="txtField1"> <input type="submit" onClick="getDetails(); return false"> </body> </html> The file includes books2.xml and contains3books.xsl (I have put the code for these files at ...ww.eyle.org/books2.xml ...ww.eyle.org/contains3books.xsl) (NB: replace ...ww. with http: // www)

    Read the article

  • XMLHttpRequest in Ajax and PHP

    - by ajithperuva
    In internet explorer we can create the object of ActiveXObject like follows xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load("note_error.xml"); It is possible to use the xmlDoc.load("note_error.xml"); for the object of XMLHttpRequest in other browsers.If no,any other substitute for this method when we use XMLHttpRequest.Please help...am using firefox as my browser

    Read the article

  • javascript XSL in google chrome

    - by Guy
    Hi, I'm using the following javascript code to display xml/xsl: function loadXMLDoc(fname) { var xmlDoc; // code for IE if (window.ActiveXObject) { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xmlDoc=document.implementation.createDocument("","",null); } else { alert('Your browser cannot handle this script'); } try { xmlDoc.async=false; xmlDoc.load(fname); return(xmlDoc); } catch(e) { try //Google Chrome { var xmlhttp = new window.XMLHttpRequest(); xmlhttp.open("GET",file,false); xmlhttp.send(null); xmlDoc = xmlhttp.responseXML.documentElement; return(xmlDoc); } catch(e) { error=e.message; } } } function displayResult() { xml=loadXMLDoc("report.xml"); xsl=loadXMLDoc("report.xsl"); // code for IE if (window.ActiveXObject) { ex=xml.transformNode(xsl); document.getElementById("example").innerHTML=ex; } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToFragment(xml,document); document.getElementById("example").appendChild(resultDocument); } } It works find for IE and Firefox but chrome is fail in the line: document.getElementById("example").appendChild(resultDocument); Thank you for you help

    Read the article

  • MS Word opens documents hosted on WebDav share read-only on Windows Vista and 7 but only if no other

    - by rjmunro
    We have a WebDav server with some Word documents on it. (We are using PHP's HTTP_WebDAV_Server but get the same issue on tests with Apache mod_dav - both use digest authentication, basic auth doesn't work on Vista or later) We have a web page that opens the word documents using javascript like: Doc = new ActiveXObject("Sharepoint.OpenDocuments.3"); Doc.EditDocument(url, 'Word.Document'); which causes word to connect to the webdav server and open the document, bypassing IE and most of windows built in WebDav client. On Windows XP, this works perfectly, and (after prompting you to log in) allows you to edit the word document and save it back to the server. On Windows 7 and Windows Vista, this usually opens the document read only, but not in all cases. After quite a bit of trial and error, we found that it worked (i.e. opened read/write) if Explorer happened to be already connected to a WebDav server. Note that this works with any Webdav server, not neccesarily the one with the document that you are trying to edit. So other than telling our users to change settings on their machine, is there anything we can do in the javascript sharepoint call, or on the WebDav server that will fix this issue. Ps. We have the same problem when launching Word from an HTA file version of our system, with javascript like: wordApp = new ActiveXObject("Word.application"); wordApp = new ActiveXObject("Word.application"); wordApp.Visible = true; doc = wordApp.Documents.Open(url); Pps. Sorry if you think this question should be on Serverfault (or even SuperUser). I couldn't decide, but because we are programming the WebDav server ourself (in PHP) and I have more rep on this site than the others, I decided to post it here :-)

    Read the article

  • Unable to send '+' through AJAX post?

    - by Harish Kurup
    I am using Ajax POST method to send data, but i am not able to send '+'(operator to the server i.e if i want to send 1+ or 20k+ it will only send 1 or 20k..just wipe out '+') HTML code goes here.. <form method='post' onsubmit='return false;' action='#'> <input type='input' name='salary' id='salary' /> <input type='submit' onclick='submitVal();' /> </form> and javascript code goes here, function submitVal() { var sal=document.getElementById("salary").value; alert(sal); var request=getHttpRequest(); request.open('post','updateSal.php',false); request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); request.send("sal="+sal); if(request.readyState == 4) { alert("update"); } } function getHttpRequest() { var request=false; if(window.XMLHttpRequest) { request=new XMLHttpRequest(); } else if(window.ActiveXObject) { try { request=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { request=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { request=false; } } } return request; } in the function submitVal() it first alert's the salary value as it is(if 1+ then alerts 1+), but when it is posted it just post's value without '+' operator which is needed... is it any problem with query string, as the PHP backend code is working fine...

    Read the article

  • Problem in getting Http Response in chrome

    - by Bhaskasr
    Am trying to get http response from php web service in javascript, but getting null in firefox and chrome. plz tell me where am doing mistake here is my code, function fetch_details() { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest() alert("first"); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP") alert("sec"); } xhttp.open("GET","url.com",false); xhttp.send(""); xmlDoc=xhttp.responseXML; alert(xmlDoc.getElementsByTagName("Inbox")[0].childNodes[0].nodeValue); } I have tried with ajax also but am not getting http response here is my code, please guide me var xmlhttp = null; var url = "url.com"; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); alert(xmlhttp); //make sure that Browser supports overrideMimeType if ( typeof xmlhttp.overrideMimeType != 'undefined') { xmlhttp.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { alert('Perhaps your browser does not support xmlhttprequests?'); } xmlhttp.open('GET', url, true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { alert(xmlhttp.responseXML); } }; } // Make the actual request xmlhttp.send(null); I am getting xmlhttp.readyState = 4 xmlhttp.status = 0 xmlhttp.responseText = "" plz tell me where am doing mistake

    Read the article

  • Unable to send multiple AJAX request in a loop?

    - by Harish Kurup
    I am sending multiple AJAX request through a loop, but some request are successfully send not all.. my code goes here... for(var i=0; i<dataArray.length; i++) { var request=getHttpRequest(); request.open('post','update.php',false); request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); request.send("data="+dataArray[i]); if(request.readyState == 4) { alert("updated the data="+dataArray[i]); } } function getHttpRequest() { var request=false; if(window.XMLHttpRequest) { request=new XMLHttpRequest(); } else if(window.ActiveXObject) { try { request=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { request=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { request=false; } } } return request; } here in the above code, some data are being posted, but some dont, it does not return the readyState = 4. i.e if i have array with dataArray['1','2','3','4']; it updates only 1,2,and 4 and skips 3, or other value in between... is there any solution..please help...

    Read the article

  • Access is denied. Javascript error on request to secured page

    - by ihorko
    On SomePage.aspx page by javascript (XMLHttpRequest) I call SecuredPage.aspx used next code: var httpRequest = GetXmlHttp(); var url = "https://myhost.com/SecuredPage.aspx"; var params = "param1=" + document.getElementById('param1').value + "&param2=" + document.getElementById('param2').value; httpRequest.open("POST", url, true); httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpRequest.onreadystatechange = function() { //Call a function when the state changes. if (httpRequest.readyState == 4 && httpRequest.status == 200) { alert(httpRequest.responseText); } } httpRequest.send(params); // HERE ACCESS IS DENIED //--------------------------------------------- function GetXmlHttp() { var xmlhttp = false; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) // code for IE { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } } return xmlhttp; } It throws Access is denied error. if send to http (http://myhost.com/SecuredPage.aspx), it works fine. How is it possible to resolve that problem. Thanks!

    Read the article

1 2 3 4 5 6 7 8  | Next Page >