JavaScript Being Detected As ActiveX??
Mar 9, 2007
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?
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
Is there any way i can show my excel chart on my web page.
View 2 Replies
View Related
Jul 19, 2006
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.
I've declared my object as follows:
<OBJECT
ID = "Test3"
CODEBASE = "http://www.amys-attic.com/Test3.exe"
CLASSID = "CLSID:2ACAEF35-445C-4717-8ACB-A3423E8D64EB"
style="display:none;">
</OBJECT>
My javascript event handler is as follows:
<script language="javascript" for="Test3"
event="PipeEvent(bIsPresent)">
alert("Pipe Detect");
</script>
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?
View 3 Replies
View Related
Jul 23, 2005
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):
http://support.microsoft.com/defaul...B;EN-US;Q290591
I just dont see what could be going wrong here.
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.=
View 2 Replies
View Related
Dec 11, 2006
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');
}
View 6 Replies
View Related
Nov 9, 2011
Does not work:
<BODY onload="s.innerHTML=('im1='+im1.offsetLeft+','+im1.offsetTop+';im2='+im2.offsetLeft+','+im2.offsetTo p)">
<form style="position:absolute;top:40;left:40;">
<IMG id="im1">
<img id="im2" style="position:absolute;top:40;left:40;">
</form>
<span id="s"></span>
Works:
<BODY onload="s.innerHTML=('im1='+im1.offsetLeft+','+im1.offsetTop+';im2='+im2.offsetLeft+','+im2.offsetTo p)">
<form style="position:absolute;top:40;left:40;">
</form><IMG id="im1">
<img id="im2" style="position:absolute;top:40;left:40;">
<span id="s"></span>
View 2 Replies
View Related
Mar 22, 2010
How would you go about writing a script to switch the style sheet if low bandwidth is detected? Is this even possible?
View 3 Replies
View Related
Mar 26, 2010
I'm loading content using an XMLHttpRequest and sending it to a Code:div on the fly in Greasemonkey. However, when I try to traverse through this newly loaded content and retrieve the innerHTML, jquery returns a null.
My code is as such
Code:
var xhReq = new XMLHttpRequest();
xhReq.open("GET", linksRaw, false);
xhReq.send(null);
[Code]....
View 1 Replies
View Related
Mar 25, 2010
I'm just starting to learn languages like jQuery, PHP and AJAX. I will post exactly what a potential client asked me. I'm not willing to say no, because everything else he asked I can do myself, but if it's far beyond my capabilities, I may have to just hire someone to code this part.
Quote: For our home page main menu bar, we would like to have a script (that we design) that if it recognizes a cookie, it shows a slightly different menu bar than if it doesn't see our cookie. For instance, if a user is "remembered" we want the menu to have a support button visible, if the user isn't remembered by our script, its button would then be "Free Trial" I understand exactly what he wants, just not sure how best to go about it. I believe I've seen this before, and I thought maybe AJAX was the best way to do it, but please, correct me if there is a much easier way.
I figure it's a matter of just showing and hiding an object in a kind of IF / ELSE situation.
View 3 Replies
View Related
Oct 7, 2009
I need to get JavaScript to change the font size used for a website if Opera is detected. I have been trying this but it hasn't worked:
function changeFooter(){
if (navigator.userAgent.indexOf("Opera") >= 0) { // if I alert this line the output is 0
document.getElementById("footer").style.fontSize = '0.5em';
};
[Code].....
I was hoping that I could benefit from your collective wisdom as I am not sure where I am going wrong with this and several hours spent searching the web for answers have been fruitless so far...
My knowledge of JavaScript is not very extensive, I haven't studied it in great depth so perhaps I am making some very silly mistakes here.
My pseudo code for this exercise is something like this:
detect browser
if browser = Opera {
change font-size for body to 90%
}
[Code]....
View 1 Replies
View Related
Feb 1, 2011
IE has a real problem working with my site at the moment and I want to force people to only NON Microsoft browsers for the moment until I get around to fixing the issue (I am only in beta, so its not a major issue)I have seen guides on how to do the detection, and im sure this is a real simple question, but how do i get it to stop loading the page (i.e just provide a blank white page) straight after the popup warning message? this is what i have
Code:
<SCRIPT language="JavaScript">
<!--
[code]....
View 2 Replies
View Related
Feb 16, 2011
I added a test script to detect the change of a html select object and it is not firing.
The select is within a table row. The table id is: flogtable and the select is in the first row.
The test function I added is:
$('.symselect').change(function() {
alert('Handler for .change() called.');
});
View 2 Replies
View Related
Nov 19, 2010
I was reading various articles on browser detection with javascript and I know it can be unreliable and unprofessional at times, but I was just playing it to see if I could get something working. What I wanted to do was attach a stylesheet if the browser in safari.
With what I remember from the articles I read, isn't there a function that is navigator.appName(); ? I have written it in sorta of pseudo-code below:
Essentially,
if(browserName=="safari"){
<link type="text/stylesheet" href="safariStyling.css"/>
}else{
<link type="text/stylesheet" href="defaultStyling.css"/>
}
I know that there is a .html() jQuery function where I can write html in the head of the document like so, head.html (HTML GOES HERE); but I have heard and form experience that mixing javascript and jQuery function can be dangerous. I would detect if the browser is safari and then link a stylesheet if true?
View 13 Replies
View Related
Oct 28, 2011
So my task was to build basically photo-based department org-charts for a SharePoint 2007 environment. Not sure why I was asked to do this as the last time I web designed was when Netscape 4.0 and IE4 were still duking it out, but whatever.I inserted my images (125x125) into tables and everything looks great. on my screen.Boss's screen, a slightly smaller monitor with a lower resolution, not so much.I'd like to be able to dynamically resize the image display sizes based on detected screen resolutions, or failing that, have at least 2 image libraries using 75x75 and 125x125 and then load one image size or the other based again on detected screen resolutions.
View 9 Replies
View Related
Jul 23, 2005
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!
View 1 Replies
View Related
Jul 20, 2005
I have a ActiveX object. This is working fine in English windows and IE, But causes IE to crash in Chinese windows.
View 1 Replies
View Related
Jan 6, 2010
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...
View 7 Replies
View Related
Aug 1, 2009
I am currently detecting for Shockwave within IE by doing the following:
var isInstalled = false;
if (window.ActiveXObject) {
var control = null;
try {
control = new ActiveXObject('SWCtl.SWCtl');
} catch (e) {
[Code]...
This works as expected and if it fails to detect Shockwave I tell the user to install Shockwave.The problem comes when AcitveX is disabled as it still returns the same message that it's not installed. I would prefer to be able to include an extra step to detect if ActiveX is disabled, in which case I can tell the user to enable it rather than giving them false advice. My only idea would be to detect for an ActiveX Object that every IE user should have installed.
View 1 Replies
View Related
Jan 6, 2010
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?
<script language="javascript" type="text/javascript">
function ExportToExcel() {
input_box=confirm("Export to Microsoft Excel?");
if (input_box==true) {
[Code]....
View 5 Replies
View Related
Jan 3, 2003
I thought I'd post this and see what you guys think (go easy on me :)). Anyway, my teacher gave the class a project to see if we could make a hangman game with an ActiveX object's draw methods and some good ole' DHTML. I've always wondered why javascript doesn't have any draw methods or graphics objects like Java has.
I suppose SVG will take the place of activeX and Flash... hopefully. Once we had the right object id it was a piece of cake (I found it by the way). Anyway, here's my program. I would've put the code in this post but I have a few includes and graphics that go with it. Best viewed in 1024 x 768 resolution, and IE only (of course).
View 2 Replies
View Related
Oct 31, 2006
I have a windows media file that I want to play on a webpage but the stupid activex content blocker keeps on poping up. I have heard that there is a way of getting around this or to preload the content. Does anyone know how to do this?
View 2 Replies
View Related
Oct 22, 2005
How can I create a fade with javascript that fade an activex object
(quicktime) to the background and not to the IE windowed control.
I call this function several times, each time decreasing the "opacity".
id is the quicktime activex object.
I have tried to set background:tranparent and
background-color:transparent in my style sheet.
//change the opacity for different browsers
function changeOpac(opacity, id) {
var object = document.getElementById(''+id+'').style;
if (object.opacity) {
object.opacity = (opacity / 100);
} else if (object.MozOpacity) {
object.MozOpacity = (opacity / 100);
} else if (object.MKhtmlOpacity) {
object.KhtmlOpacity = (opacity / 100);
} else if (object.filter) {
object.filter = "alpha(opacity=" + opacity + ")";
}
}
View 1 Replies
View Related
Jan 14, 2006
i could create it successfully, but i can't manipulate it
<html>
<body>
<object height="50% width="50%" classid="clsid:XXXX....." id
= obj>
<script language= javascript>
obj.gridVisible= true //the method call here
don't take effect
</script>
</body>
</html>
here is the interface i implemented in my control
interface IControlInterface : IDispatch
{
[id(..), propput]
HRESULT gridVisible ([in] VARIANT_BOOL bVal);
}
anything wrong?
View 1 Replies
View Related
Jul 20, 2006
How to judge whether a browser supports ActiveX?
Some browser like Firefox doens't support ActiveX by default, but can
do it with plugin support. Take Firefox for example, it has a whitelist
(activex.js) of allowed ActiveX. So, "new ActiveXObject" may not be a
good idea. The ActiveX control for test is possibly not in the
whitelist.
Is there any better way to do that?
View 2 Replies
View Related
Jul 20, 2005
There is two lines from my script:
<script language="javascript1.2">
fso = new ActiveXObject("Scripting.FileSystemObject");
ws = new ActiveXObject("WScript.Network");
</script>
Everything working fine, but sometimes some admin change default IE options and during loading the page on screen i can see something like that "Can I run the activex and bla bla bla". This message for my user equal error and I get many phones, Can I catch insufficient permision, or that message and hide it?
View 3 Replies
View Related
Feb 3, 2010
How can I handle ActiveX events in jQuery?
View 1 Replies
View Related