Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

editing activex object with javascript : pb with msg box

Status
Not open for further replies.

lntk

IS-IT--Management
Jun 23, 2003
3
0
0
FR
Hi all.
I must publish data from an Excel Worksheet into a web page.
For this i use activeX controls in javascript :

<script language=&quot;JavaScript&quot;>

var fichier_excel;
var valeur_cellule;
fichier_excel=new ActiveXObject(&quot;excel.application&quot;);
fichier_excel.visible=false;

function importation_cellules_1(y,x){
fichier_excel.Workbooks.Open(&quot;C:\\fiche.xls&quot;);
var valeur_cellule = fichier_excel.ActiveSheet.Cells(y,x).Value
document.write(valeur_cellule);
}

</script>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;onload=&quot;importation_cellules_1(18,2)&quot;>

All this works very fine but i have a problem with an IE functionality. Before the web page opens, a msg box appears. It says there are ActiveX controls in the current page and that it could be unsafe etc...
I need to click &quot;OK&quot; to load the page and this is very annoying for other functionalities of the page on other frames.
I thought that this message was related to the security level in IE. I set up the IE security parameters to the lowest level : it does not solve my problem.
I tried the script with several PC and IE versions (5 / 5.5 / 6) : same problem.
My question is : do you know some way to directly skip or validate the msg box without human intervention?
Thanks a lot for your help.
Pierre.
 
I thought that this message was related to the security level in IE

That is correct in your assumption. Howevere any security level I believe in IE will have the ActiveX scripting disabled due to the valnurability at that point. More then likely the only time this option will be enabled is a closed door situation. eg: intranet etc.. without outside access to resources. It's kind of obviouse why yuou wouldn't want this option enabled while surfing.

Tools
--internet options
---Security
----Custom Level (button)
-----Enable all ActiveX scripting controls and plug-ins

____________________________________________________
[sub]The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924[/sub]
onpnt2.gif
 
thanks for the answer.
Anyway, i have another solution from a forum user : rename your page &quot;page.htm&quot; into &quot;page.hta&quot;. No more notification msg ... !!! No more active X checking... and the page works good.
But all this may permit unexpected and dangerous use of a simple web page...
Pierre.
 
scary stuff man! with the HTA you have basically NO security.
eg:

basically, yes it will permit a dangerous situation

____________________________________________________
[sub]The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924[/sub]
onpnt2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top