By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

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

P: n/a
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>
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <3d**************************@posting.google.com >,
le****@iis.sinica.edu.tw says...
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!!
[snip]

Works fine for me using IE 6.0.2800.1106.xpsp2 and Firefox on the
same platform.

<script language="JavaScript">


Should be:

<script type="text/javascript">

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

Cheers.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.