472,954 Members | 1,670 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

"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 2401
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
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...
2
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
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...
1
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...
3
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...
3
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...
4
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 =...
5
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...
1
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.