473,516 Members | 3,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Operation aborted" in Internet Explorer 6. Script works up untilthat point.

This is more of a post to inform, unless of course I am missing
something fundamental, in which case I would appreciate anyone
explaining it.

Based on Mr. Michaux's camelizeStyle function I wrote:

function create_style(style)
{
var p = document.createElement('p');
var t = document.createTextNode('Just something to fill the P.');
p.appendChild(t);
for (var i in style)
{
p.style[camel_style(i)] = style[i];
}
getTags('body')[0].appendChild(p);
}

getTags is simply a wrapper for getElementsByTagName.

Now... I happened to notice that in Internet Explorer 6 (Windows XP
SP2), if I called create_style({ 'background-color': '#00f' }) within
the document BODY, Internet Explorer firstly shows me my newly created
P, styles and all, and THEN issues a message box (like an alert) saying:

***
Internet Explorer cannot open the Internet site
file://test_create_style.htm.

Operation aborted

[ OK ]
***

Why does it abort? I am assuming because it was not in a DOM-ready state.

Why does it show me the newly created P, styles and all? I am assuming
because Internet Explorer mostly does what it wants to.

Anyway, the same function performs wonderfully in the onload event.
Declared as window.onload or as an inline event to the BODY.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jun 6 '07 #1
1 2438
Pi
On Jun 5, 8:15 pm, -Lost <maventheextrawo...@techie.comwrote:
This is more of a post to inform, unless of course I am missing
something fundamental, in which case I would appreciate anyone
explaining it.

Based on Mr. Michaux's camelizeStyle function I wrote:

function create_style(style)
{
var p = document.createElement('p');
var t = document.createTextNode('Just something to fill the P.');
p.appendChild(t);
for (var i in style)
{
p.style[camel_style(i)] = style[i];
}
getTags('body')[0].appendChild(p);

}

getTags is simply a wrapper for getElementsByTagName.

Now... I happened to notice that in Internet Explorer 6 (Windows XP
SP2), if I called create_style({ 'background-color': '#00f' }) within
the document BODY, Internet Explorer firstly shows me my newly created
P, styles and all, and THEN issues a message box (like an alert) saying:

***
Internet Explorer cannot open the Internet site
file://test_create_style.htm.

Operation aborted

[ OK ]

IE has issues where it crashes in the manner you specified if you try
to modify a DOM element before it's completely loaded. Happened to me
many times before. My suggestion? Wrap all your content in a div
wrapper, say with id="xyz", and then put your script block outside
that div, but before the </bodytag. Then apply your script to
document.getElementById('xyz'). I think it should work.

Pi
***

Why does it abort? I am assuming because it was not in a DOM-ready state.

Why does it show me the newly created P, styles and all? I am assuming
because Internet Explorer mostly does what it wants to.

Anyway, the same function performs wonderfully in the onload event.
Declared as window.onload or as an inline event to the BODY.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.

Jun 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2129
by: TC | last post by:
Hey Folks, While coding in VBA, I had been receiving script errors when attempting to utilize the online help from within the VBA IDE. After fiddling with security settings and much searching for KB Articles as well as Googling newsgroups archives all to no avail, I finally discovered the resolution to this issue. From within Internet...
2
4206
by: mahurshi | last post by:
I am trying to read a file full of numbers followed by spaces (and then do some cool stuff with it) My input file looks like this 1 0 1 0 1 0 1 1 1 0 0 1 1 0
2
14926
by: Ronny Sigo | last post by:
Hello all, I already put the same question, only now I have more to tell ... Although I used this code before in the same routine (only the fieldname of the table differs) ___ at this point in the code I get the error "You canceled the previous operation" err msg. When clicking on Help I get a white screen. I haven't got the slightest idea...
1
6489
by: Elliot M. Rodriguez | last post by:
A few of our customers cannot access one of the pages on our vb.net asp.net site. The problems are limited to only a few people, but these people have the problem regularly. The page in question is a simple details page from a link selected from another page. The details page calls a procedure that calls our database, returns a recordset,...
3
1805
by: SKG | last post by:
I have a web page with customized datagrid and a usercontrol. Sometimes iam getting "operation aborted" internet explorer cannot find site <web page name..> when i click back button i see the page is loaded. I found my viewstate has lot of junk 3 to 4 pages. I increased temporary cache,deleted temporary files,cookies,third party installs...
3
2935
by: Stephen Miller | last post by:
I have an ASP.Net application that sends a NetworkStream to a .Net Service, which has a TcpListener listening on a port for the ASP.Net client. When it receives a request it creates a new thread with the AddressOf a class that runs a long data intensive process that can take between 1-15 minutes and results in the creation of a uniquely named...
4
6487
by: MDW | last post by:
Hey all. I'm confused. I'm trying to add a single record into an Access 2000 database using ASP.Net. Here is the code: objConn = New OleDbConnection(strConnect) objConn.Open objCommand = New OleDbCommand("INSERT INTO LOGIN_MASTER (LOGIN_ID, PWD, F_NAME, L_NAME, TYPE_ID) VALUES ('" & strEmail & "','" & strPwd & "','" &
5
2015
by: Alan Silver | last post by:
Hello, I have a page that is supposed to do some checking, and if OK, set a session variable before redirecting to another page. The following code is a simplified version, I have hard-coded the basket ID and removed a load of extra checking... public partial class GoToCheckout : Page { public void Page_Load(Object o, EventArgs e) { try...
1
2004
by: rmgalante | last post by:
I was wondering if anyone knows whether MS has a fix for the Menu Control. If the page is loading while you mouse over a menu control with child menus that pop out, you can generate the following error in IE. Internet Explorer cannot open the Internet site... http://www.... Operation aborted
0
7276
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7548
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.