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

L

lendle

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>
 
R

RobG

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top