473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
1 1771
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matthew | last post by:
Is there a javascript or alternative default fill friendly way for counting down the remaining characters left in a form box?
2
by: Ola Fjelddahl | last post by:
hi. I load a script dynamically and it works * everytime with IE6. * sometimes! with Mozilla1.5 <- makes me curious * never with Opera7.11 all tests on WindowsXP. With "sometimes" I mean
4
by: Derek | last post by:
I have the following script in a page and it gets an error in IE 6. Says something about an invalid argument but the line number doesn't help since I can't see the javascript code when viewing...
1
by: cwdjrxyz | last post by:
I am now writing many new pages in xhtml 1.1. They are served as true xhtml by setting the mime type of the server to application/xhtml+xml for the .xhtml extension. Since IE6 and some earlier...
7
by: cjl | last post by:
Hey all: I've searched the newsgroup, and googled, but I'm stuck. I want to be able to 'dynamically' add a .js file to a web page after the page has loaded, based on user interaction. For...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
4
by: aramsey | last post by:
I have a javascript program that works fine under Firefox and on IE when running XP, but is having a problem with IE running under Windows 2000 Pro. On my personal XP development machine I have...
6
by: RossRGK | last post by:
A script I've implemented is doing this annoying thing where it works in mozilla only if you have Firebug installed. I was all excited to find someone had solved what sounded like the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.