I know this question has been asked a million times but I still can't
get an event from an embedded ActiveX Exe to be caught in javascript.
I am able to access all the properties and methods of the ActiveX Exe,
I just can't seem to catch the event.
The event handler never fires. I debugged the ActiveX Exe and verified
that the event is indeed being raised. I am able to catch the event in a VB6 test container project as well. Any ideas?
I built a form that utilizes arrays for storing data, prototype objects stored in arrays, and DOM using getElementByID and getElementByName. Now, in XP SP2 with the security center turned on, I get alerted by IE6/7 that there is an ActiveX script on the page and it asks to be allowed.
I don't want users IE to see this ActiveX warning. First, the users going to be using this form are not exactly tech savvy enough to know to allow it. Second, I had no idea JavaScript was related to ActiveX--which begs the question, what sort of things cause JavaScript to be flagged as ActiveX?
Ive been banging my head on the wall for hours with this one, hopefully someone will know what Im doing wrong here :
The Goal:
I have an xml file that is generated on the fly via JSP which I want to load into a Microsoft.XMLHTTP ActiveX object and manipulate via javascript on the client side. Data is retreived from the server at the request of the javascript without having to reload the page.
The Problem:
For the JSP to dynamically output xml, the file must have the extension JSP, which is set to the mime type of dynamo-internal/html on the server side (as we are using ATG Dynamo). But the javascript on the client side will not retrieve anything unless the file extension is ..xml (or the mime type is recognized as text/xml). So the only way I can get it to work is to change the extension to .xml, which then of course amkes it so that the server will not process any of the JSP code.
Ive tried to override the mime type within the javascript, using the setRequestHeader method after opening the file, but no luck. A call to alert the value of req.responseXML.xml after the send() turns up empty. Ive only gotten it to work if I use a static xml file in palce of the jsp. Sample of the javascript code is below:
if (window.XMLHttpRequest) { // branch for native XMLHttpRequest object - THIS WORKS req = new XMLHttpRequest(); req.overrideMimeType("text/xml"); req.onreadystatechange = processReqChange; req.open("GET", "models.jsp?cId=300006&mId=TAC24", true); req.send(null); alert(req.responseXML.xml); //this gives me the resulting xml file } else if (window.ActiveXObject) { // branch for IE/Windows ActiveX version - NOT WORKING req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processReqChange; req.open("GET", "models.jsp?cId=300006&mId=TAC24", true); req.setRequestHeader("Content-Type","text/xml"); req.send(); alert(req.responseXML.xml); //this gives me nothing } }
In looking at the following example the Microsoft gives (bottom of page):
I should note that I successfully got the script to work using the XMLHttpRequest object and the overrideMimeType() method. This works with FireFox and I think some Mozilla clients, but not with the all important IE5, which instead uses the XMLHTTP ActiveX control.=
I am trying to use the Goto method of the Word ActiveX object. I am trying to open a document and go to a named bookmark. If I use this code in VB it works, so I'm sure the approach is possible, I just can't get JavaScript to work with it.
Here is the code I am using, the error I get from IE is Object Expected: Hope someone can help! Any help would be much appreciated
function PageLoad() { var WordApp = new ActiveXObject('Word.Application'); WordApp.Visible = true; var documentlocation = crmForm.all.new_documentlocation.DataValue; var wd = WordApp.Documents.Open(documentlocation); wd.Select(); var Name = 'TestFred' var wr = wd.Selection.GoTo(What : Word.WdGoToItem.wdGoToBookmark,Name : 'TestFred'); }
I want to capture the event when a browser is closing, to give to the user the posibility of close or no this browser. When the browser is closing, this show a confirm window with two buttons: Accept and Cancel.
When press the Accept button, the browser is closing, and when press the Cancel button, the browser isnīt closing.
I have tried with the event onunload, but this closes first the browser, and then shows the confirm window.
How can I capture the event when I click with the cursor anywhere in the page (that is, on a component or elsewhere). This event would occure in an I.E 5.5 or later browser.
Does anyone know how to event capture on an autocomplete dropdown - this would not be the underlying html element but only on the autocomplete dropdown itself.
I've never come across trying to capture autocompletes before (in fact, ideally i'm trying to ignore keypresses on the autocomplete and only capture those for the underlying input).
i am trying to load/embed pdf inside a html object tag. since loadng of pdf content takes time, I want to capture onload complete event of object tag and take some action/msg to show usr that loading is complete. but i am not able to capture onload event of object tag. i get pdf content from an aspx page in bytestream and set it as data in object tag:
JS: function loadObjectsuccess() { alert('pdf has loaded now');
'm trying to figure out how to do the following:capture a mousemove event over a div once (which triggers a function), and then once it has occurred prevent that event from occurring again. is it possible to do this? the code so far is simple:
When the user clicks on a link within that frame, the frame posts back (2. site is being displayed)....from this time on the above mentioned call does not work anymore. The code is located outside, so it should not touch anything. The strange thing is, that it works for the first site, but not for sub sites?The structure looks like the following:
I have created a classic Snake game. When I run the game in a browser, it works fine. But when I run it as an IFRAME in another window, then it fails to get the keyboard events.
Parent CODE:
Code:
<html> <head> </head>
[code]....
how to capture Window Keyboard Event in the Child IFrame
I have a javascript/MSHTML editor loaded in an IFrame call "msEditor1". It gets composed after the document loads through document.write commands from a JS function. I'm trying to set the editor so whenever a key is typed I capture the key event from the editor and then go from there.
I have a handle to the editor using either one of these:
I want to make a capture window in *standalone* (in a *.js file) javascript, much in the same way as the VBscript inputbox() function. I can make it inside a *.html file with the prompt() function.
Or, is there a way to make a window and then work with this window?
I'm really just playing around, trying to be as unobtrusive as possible, meaning that I didn't want to just do the standard on mouseover/onmouseout event actions inline in my html. My attempt was relatively close, I just need a way to be able to capture the event action without passing it into a function?
Code: <script> var getTabs = function(){ var allTabs = document.getElementsByTagName("div"); for (var i=0;i<allTabs.length;i++){ if (allTabs[i].className == "tabs"){ if (allTabs[i].id == this.id){ if (this.onmouseover != null){ //alert("MouseOVer"); document.getElementById(this.id).style.backgroundColor = "#465D77"; } else if (this.onmouseout != null) { //alert("MouseOOut"); document.getElementById(this.id).style.backgroundColor = "#1a3757"; }}}}} onload = function(){ document.getElementById("tabHR").onmouseover = getTabs; document.getElementById("tabHR").onmouseout = getTabs; } </script>
HTML Code: <!-- Begin Tabs Container --> <div id="tabsContainer"> <div id="tabGlobal" class="tabsActive"> Home </div> <div id="tabHR" class="tabs"> HR Edit </div> <div id="tabReports" class="tabs"> Reporting </div> <div id="tabData" class="tabs"> Data </div> </div> <!-- End Tabs Container -->
I am trying to write a script which will allow me to read the contents of an HTTP web page into memory, parse the data, and output a calculated value.
The HTTP page is on a web enable appliance - I am reading some data out of a table for further calculation. I can't modify the web appliance, only read the text data.
I've written a script on my Windoze PC that successful uses a MSXML2 ActiveX object to read the contents of a web page into memory using the xmlhttp.responseText object. The problem is that the ActiveX object is not available on a lightweight Linux based http server.
I need to write a script that will work with ASP/Javascript on a lightweight Linux based http server.
I need to capture the click event, edit form action then re-submit the form with the captured input value appended to the end of the action. I would like the end url action to be google.com/tada
I have an HTML page where I am opening a child window using window.open. the child window is something like yahoo.com. I want to refresh the parent window when the child window is closed.
Im supposed to write an activeX dll that will be called by javascript (with the OBJECT TAG) and was wondering if its supposed to have any special features or its a regular activeX dll.
Also I would like to know if it matters if its written in C++ or VB, and if someone has sample C++ code that does this i will be grateful to see!
I have JavaScript code, that exports a HTML table to MS Excel.
This works fine on my development (local) server, however, it fails to work on my 'live' IIS server. Once I click on the Export link, I confirm the "Export to Microsoft Excel?" message, then nothing happens. I am not sure if MS Excel needs to be installed on the server or not?code...