Connecting Tech Pros Worldwide Forums | Help | Site Map

script works in hta files and also mozilla but not work on IE?

lendle
Guest
 
Posts: n/a
#1: Jul 23 '05
Hello,
I have some javascript on local disk, they work fine on mozilla
browsers and event work when I put the html into hta format. However,
the code does not work on IE of my computer. I've tried to run the
script on other computer which has the same OS version, the same IE
version, the same patches......but they work!! I have checked the
security settings on my computer, and turn everything to low security,
but it still not work. Since the script works well in hta file, I
still this still should be a security-setting problem, but I just
cannot figure out:(
Is there any suggestions? I would appreciate very much! Thank you!!

the code is like the following, and the onclick event is never fired:

<html>
<body>
<script language="JavaScript">
var obj=window.document.createElement("form");
obj.innerHTML="<input type='button' value='xx'
onclick=\"alert('123')\">";
window.document.body.appendChild(obj);
</script>
</body>
</html>

RobG
Guest
 
Posts: n/a
#2: Jul 23 '05

re: script works in hta files and also mozilla but not work on IE?


In article <3da778e7.0409201716.72348235@posting.google.com >,
lendle@iis.sinica.edu.tw says...[color=blue]
> Hello,
> I have some javascript on local disk, they work fine on mozilla
> browsers and event work when I put the html into hta format. However,
> Is there any suggestions? I would appreciate very much! Thank you!!
>[/color]
[snip]

Works fine for me using IE 6.0.2800.1106.xpsp2 and Firefox on the
same platform.
[color=blue]
>
> <script language="JavaScript">
>[/color]

Should be:

<script type="text/javascript">

but that is a minor issue that will not solve your problem.

Cheers.
Closed Thread