JavaScript - Users In Ie Are Not Getting Script/activex Warning
I have a program written in Javascript (saved as an HTML file that I run from my desktop by launching it in IE) which works fine on my system. Running IE 8 in Vista on one system and XP on another.
When I launch the file, I get warning in the information bar: "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX cntrols that could access your computer. Click here for optons..." I actually WANT this warning. When I click through it to accept, the program works fine. But about half of the people that I share this program with are not getting this warning, and it appears that the javascript never runs. At first I thought it was something in Windows 7, because two of the users were running on that OS, and I've found a number of issues described online about having problems running scripts in IE8/Win7. But the latest user is also running Vista, like me. His security settings are set to the default, Medium-High. But he's still not getting the script/ActiveX warning in the message bar. Anyone know how we can enable that warning? Thanks! Similar TutorialsEither that or provide me with an alternative way of coding a web application in a browser. Suppose I create a nifty web application that runs in your browser for which there is currently high market demand, but for some reason competitors have all overlooked it. I am sure that if I simply implemented it in regular JavaScript for all to see, it would not be long before competitors catch on and steal the concept from me (loosely speaking, in a way that doesn't violate copyright). However, I can delay my competitors if I can find a way to conceal the code. But JavaScript is not readily concealable, and there are always simple ways to reveal it by common methods suggested by people. Is anybody clever enough to suggest a solution for me? Perhaps this wouldn't even be Javascript, but here's my question. Is there a script that would direct Opera users past the front page of a web site (that uses flash) to the home page? For instance, a site I'm building as a favor to a church has a flash intro page that is fine with every browser but Opera. (Opera doesn't respond to Autoplay but places a large "Play" button where the flash is located.) On this particular page, the flash movie ends with an "Enter" instruction and is a hyperlink to the "home" page, so if an Opera user clicks that button, they're still not going to see the flash but are going to arrive at the "home" page. Is there a way to not even present them with the flash page, but to send them straight to the home page? I'd appreciate any assistance. Hello all, i am new to this forum.. i am validating a form and displaying results.. but, instead of displaying the result in popup(alert), i need to display it as a text that disappears after a few seconds.. Code: function valtext() { if(document.getElementById("functional").value == "") { document.getElementById("label").innerHTML=message; startTimer(); } } function hideMessage() { document.getElementById("label").style.display="none"; clearTimeout(tim); } function startTimer() { tim = setTimeout("hideMessage()",3000); } i did it using the above code.. but my problem is, i cant check it the second time, without reloading the page.. how to do it without refreshing the page and i want to add a bg color to that warning.. how to do that.. and, is there anyother way of doing it? any help is much appreciated.. and thanks Hi every one i need ActiveX for my company web site and it work like this i will have .cab file and inside it .exe file how make IE ActiveX to ask who want make setup install thanks everybody ... I have an application written in JS and using Activex. this code work fine in IE7, IE8 but in IE9 it does not invoke the ActiveX put_EventInputString function <script type="text/vbscript" language="vbscript" for="CLSID:XXXX" event="GetParameterValue(byval TheValue)">me.EventInputString = me.getVarValue(TheValue);</script> any ideas? Hi, I am currently detecting for Shockwave within IE by doing the following: Code: var isInstalled = false; if (window.ActiveXObject) { var control = null; try { control = new ActiveXObject('SWCtl.SWCtl'); } catch (e) { return; } if (control) { isInstalled = true; } } 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. Any ideas on what that ActiveX Object could be or any ideas on how I could tackle this problem are greatly appreciated. Thanks I have written JS , in which I used activex control which does not work on mozila , anyone has idea to to same thing without activex , here is code which just upload the textfile contains on html page . <html> <head> <script type="text/javascript" language="javascript"> function Read() { var Scr = new ActiveXObject("Scripting.FileSystemObject"); var CTF = Scr .OpenTextFile("J:\\Users\\Karimkhan\\Desktop\\2011-03-01.txt", 1, true); data = CTF .ReadAll(); document.write("<pre>" + data + "<pre>"); //alert(data); CTF .Close(); } </script> </head> <body onLoad="Read()"> </body> </html> Hi Chaps, 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? If anyone has any ideas, I'd be most grateful: Code: <script language="javascript" type="text/javascript"> function ExportToExcel() { input_box=confirm("Export to Microsoft Excel?"); if (input_box==true) { var xlApp = new ActiveXObject("Excel.Application"); // Silent-mode: xlApp.Visible = true; xlApp.DisplayAlerts = false; var xlBook = xlApp.Workbooks.Add(); xlBook.worksheets("Sheet1").activate; var XlSheet = xlBook.activeSheet; XlSheet.Name="Report"; // Store the sheet header names in an array var rows = tblrepeat.getElementsByTagName("tr"); var columns = tblrepeat.getElementsByTagName("th"); var data = tblrepeat.getElementsByTagName("td"); // Set Excel Column Headers and formatting from array for(i=0;i<columns.length;i++){ XlSheet.cells(2).value= "Projects - All"; XlSheet.cells(3,i+1).value= columns[i].innerText; //XlSheetHeader[i]; XlSheet.cells(3,i+1).font.color="6"; XlSheet.cells(3,i+1).font.bold="true"; XlSheet.cells(3,i+1).interior.colorindex="37"; XlSheet.Range("A1:B1000").HorizontalAlignment = -4131; } //run over the dynamic result table and pull out the values and insert into corresponding Excel cells var d = 0; for (r=4;r<rows.length+3;r++) { // start at row 2 as we've added in headers - so also add in another row! for (c=1;c<columns.length+1;c++) { XlSheet.cells(r,c).value = data[d].innerText; d = d + 1; } } //autofit the columns XlSheet.columns.autofit; // Make visible: xlApp.visible = true; xlApp.DisplayAlerts = true; CollectGarbage(); //xlApp.Quit(); } } </script> I posted my ActiveX question in HTML but have received no replies so I was wondering if this was the thread to post it in.
Hi, Is there any way to use the activeX to execute a local aplication with parameters... Example: PHP Code: <script> var ws = new ActiveXObject("WScript.Shell"); ws.Exec("c:\\windows\\notepad.exe"); </script> Hi I'm using an ActiveX control in my html page.. Each time i load the page ie pops a message box to allow the activex to run or not . Is there any way to handle that message box using javascript. Or is there any other way to avoid that message box because each time the page loads i have to give yes and then proceed. By default i've to give yes is there any way to handle that using javascript. help me out please... Hi Chaps, I have some Javascript code, that sucessfully exports Project data from an HTML table to an Excel SpreadSheet: Code: function ExportToExcel() { var xlApp = new ActiveXObject("Excel.Application"); // Silent-mode: xlApp.Visible = true; xlApp.DisplayAlerts = false; var xlBook = xlApp.Workbooks.Add(); xlBook.worksheets("Sheet1").activate; var XlSheet = xlBook.activeSheet; XlSheet.Name="Project Details"; // Store the sheet header names in an array var rows = tbldisplay.getElementsByTagName("tr"); var columns = tbldisplay.getElementsByTagName("th"); var data = tbldisplay.getElementsByTagName("td"); //run over the dynamic result table and pull out the values and insert into corresponding Excel cells var d = 0; for (r=4;r<rows.length+3;r++) { // start at row 2 as we've added in headers - so also add in another row! for (c=1;c<columns.length+1;c++) { XlSheet.cells(r,c).value = data[d].innerText; d = d + 1; } } //autofit the columns XlSheet.columns.autofit; // Make visible: xlApp.visible = true; xlApp.DisplayAlerts = true; CollectGarbage(); //xlApp.Quit(); } As you can see, a new workbook is created and the data is exported to Excel ("Sheet1"). What I want to do is as soon as this export is complete, redirect to a seperate page, where the Jobs (linked to the Project) details are exported to Excel ("Sheet2"), without creating a new workbook. Is this do-able? I have an html file I've built with embedded Javascript (using ActiveX) that successfully reads a file on my local hard drive when I run the html file through my web browser (IE) locally. However, when I copy the html page up to a webserver and access it through the internet, it doesn't appear to be reading the local file. I'm assuming this can't be done because of security reasons? Am I correct in that? Is there any way using Javascript/ActiveX that you can get a webpage on the internet to access a file on the visitor's local drive? (other than cookies)
Hi All, Need some urgent. We are having a javascript which is throwing the foll error "Object doesn't support this property or method". The javascript function being called is using a Scanner API. So this is using some ActiveX. Below is the code for javascript <script language="javascript"> // Initialize scanning function OnLoad() { try { Scanner.OpenScanner(); // Scanner.ScanPriority = 0; // Set scanner to Foreground Read mode before enable scanning // Scanner.EnableScanning(1); document.forms["mobileform"]["rm07m-bwartwe[1]"].value = "101"; } catch (e) { alert(e.message); } } // Clean up function OnUnload() { Scanner.CloseScanner(); // Calling Dispose is necessary for Pocket IE because of a Microsoft issue related to releasing object. if (navigator.appName == "Microsoft Pocket Internet Explorer") Scanner.Dispose(); } // Scan through soft trigger function Scan() { try { Scanner.SetSoftTrigger(1); } catch (e) { alert(e.message); } } //User-defined function to format error codes. //VBScript has a Hex() function but JScript does not. function hex(nmb) { if (nmb > 0) return nmb.toString(16); else return (nmb + 0x100000000).toString(16); } </script> There is a object tag in html <object id="Scanner"></object> The javascript functions are called from body tag. Can someone please provide some help. Thanks, Nikhil Hi Chaps, I have a Javascript ActiveX function that exports the contents of an HTML table into MS Excel. The script works fine, however, some of the dates have changed from dd/mm/yyyy to mm/dd/yyyy. I do not know why this is happening, especially as it's only to a few. Here is the code: Code: <script language="javascript" type="text/javascript"> function ExportToExcel() { input_box=confirm("Export to Microsoft Excel?"); if (input_box==true) { var xlApp = new ActiveXObject("Excel.Application"); // Silent-mode: xlApp.Visible = true; xlApp.DisplayAlerts = false; var xlBook = xlApp.Workbooks.Add(); xlBook.worksheets("Sheet1").activate; var XlSheet = xlBook.activeSheet; XlSheet.Name="Report"; // Store the sheet header names in an array var rows = tblreport_work.getElementsByTagName("tr"); var columns = tblreport_work.getElementsByTagName("th"); var data = tblreport_work.getElementsByTagName("td"); // Set Excel Column Headers and formatting from array for(i=0;i<columns.length;i++){ XlSheet.cells(1).value= "Projects - Open"; XlSheet.cells(3,i+1).value= columns[i].innerText; //XlSheetHeader[i]; XlSheet.cells(3,i+1).font.color="6"; XlSheet.cells(3,i+1).font.bold="true"; XlSheet.cells(3,i+1).interior.colorindex="37"; XlSheet.Range("B1:F1000").HorizontalAlignment = -4108; XlSheet.Range("H1:H1000").HorizontalAlignment = -4108; XlSheet.Range("J1:J1000").HorizontalAlignment = -4108; } //run over the dynamic result table and pull out the values and insert into corresponding Excel cells var d = 0; for (r=4;r<rows.length+3;r++) { // start at row 2 as we've added in headers - so also add in another row! for (c=1;c<columns.length+1;c++) { XlSheet.cells(r,c).value = data[d].innerText; d = d + 1; } } //autofit the columns XlSheet.columns.autofit; // Make visible: xlApp.visible = true; xlApp.DisplayAlerts = true; CollectGarbage(); //xlApp.Quit(); } } </script> Date Columns: F,G,I If anyone has some ideas on how to correct this, I'd be most grateful! All, If a user is going to my site with IE7 or less I call the following JS file. Code: // JavaScript Document var ie6_warning=navigator.userAgent.indexOf('MSIE 6') if (ie6_warning > 0) { document.write("<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative; z-index:5000'> <div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display=\"none\"; return false;'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div> <div style='width: 740px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'> <div style='width: 75px; float: left;'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-warning.jpg' alt='Warning!'/></div> <div style='width: 275px; float: left; font-family: Arial, sans-serif; color:#000'> <div style='font-size: 14px; font-weight: bold; margin-top: 12px; color:#000'>You are using an outdated browser</div> <div style='font-size: 12px; margin-top: 6px; line-height: 12px; color:#000'>For a better experience using this site, please upgrade to a modern web browser.</div> </div><div style='width: 75px; float: left;'><a href='http://www.firefox.com' rel="nofollow" target='_blank'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div><div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' rel="nofollow" target='_blank'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div> <div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' rel="nofollow" target='_blank'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div> <div style='float: left; width: 73px;'><a href='http://www.google.com/chrome' rel="nofollow" target='_blank'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div><div style='float: left;'><a href='http://www.opera.com/' rel="nofollow" target='_blank'><img src='http://info.template-help.com/files/ie6_warning/ie6nomore-opera.jpg' style='border: none;' alt='Opera'/></a></div> </div></div>" );} Right now it only goes 75pixels. How can I make it so that it spans the whole screen of the users computer? Thanks in advance! I am getting a JavaScript warning: Quote: Use of getAttributeNode() is deprecated. Use getAttribute() instead. It is triggered when I type in a HTML TEXTAREA. This is the relevant code: Code: <SCRIPT type="text/javascript"> function validateForm() { if (document.forms["form"]["feedback"].value == "") { alert ("Cannot submit because feedback has not been given."); return false; } } </SCRIPT> Code: <FORM action="result.html" method="post" name="form" validateForm()"> <DIV> <DIV class="feedback"><TEXTAREA class="feedback" cols="0" name="feedback" rows="0"></TEXTAREA></DIV> <BR> <BR> <INPUT class="verdana" type="submit" value="SUBMIT"> </DIV> </FORM> Why am I getting a warning about getAttributeNode() when I'm not even using it? Hi, I'm just wondering if I can do a check on my page to determine if users have javascript enabled, and if not, redirect them to a different webpage. My site requires javascript, and without it, all the jquery popup boxes and stuff overlap, so I'd rather the user just not see any of that at all. Does someone know what the JavaScript for checking if an user have "liked" and "shared" on Facebook? As far as I know, you can not check if they've shared, but only if they've clicked the button. I don't know if you can make them like to view, but it would be nice to get that piece of code too, if obtainable. I'm going to use it for a website where you have to "like" a fb page shown, and have to share the website. If someone can provide it, I'd also like a guide on timers /foldager Hi, I am setting up a form with a submit button. I want a warning box to come up saying you are about to delete user ?? image Click ok to continue or cancel Can someone give me the code please? |