Good morning,

I paid many thousands of dollars to a company that created my photo community (xtremecamera.com). Problem is, the site does not work in IE, I get the "Operation Aborted".

With the help of a great poster in the PHP section of this forum it has been determined that a single javascript is the problem. On my index.php page there are several calls for javascripts, if I remove the call for xc_modules.js the site loads fine in IE (but that script keeps hundreds of items in check, it is vital to the site)...So, there is something wrong with the script. All the other, well tested, scripts work fine.

Would anyone on this forum please take a minute or two, download my script (attached) and see if something jumps out at you? I am not asking that anyone spend any amount of real time on it, just a glance, maybe find a reason why IE doesn't like this script...

I would be very much appreciative if you can. Many thanks!

John
xtremecamera

Recommended Answers

All 4 Replies

Make sure that you don't call functions to modify the DOM for elements that have not yet been finished. That is, minimize the use of inline calls to JavaScript functions that attempt to modify the document.

You should put all calls to functions that use code like document.createElement(); or [object].appendChild(); in the body onload event; otherwise the body doesn't exist yet.

The 'Operation Aborted' error in IE is in relation to that; do a Google search for javascript "Operation Aborted" .

I imagine the problem is less about the code in that module than about the way you are using that code, I had a brief look, I see some cases where document.createElement is used. How are you calling the functions in that module from your PHP page?

Matt,

Just about everything you said went straight over my head (I think I have headache now):eek:

I've attached the following files to this post in case you have a second to take a look; the index.php file (the entire site is put together with this file), gallery.php file (so you can see a typical page), and sidebar_main.php (so you can see the other part of the page.

The site is modular, in that the index page will take the header, the drop down control panel, the sidebar, and the main content page and put them together.

Again, a huge thank you for responding. I think a lot of people don't realize that people like you cruise the site and out of the desire to help people will go through these posts looking for people like myself that need help. Its something you don't see much in the real world, so believe me I am very thankful for any assistance you can lend.

John
xtremecamera

I can't test the PHP on a server/lhost at the moment, so this is based on source code analysis only, and given that the problem 'Operation Aborted' occurs as a result of the modification of incomplete elements.

----------------

On line 59 of xc_modules.js, is this statement:

this.CSSattach();

Try commenting it out/removing it temporarily.

That appears to be the only line that modifies the DOM while loading is incomplete (SI.onbeforeload is called from an inline script at the very end of topnav.php)

It also seems like when you include includes/gallery.php into index.php that you load a page with a 'double' <html><body> element.... You can see that for real by viewing the source from the page index.php?section=gallery at your domain.

You could fix that problem by removing this from the top:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>

and this from the bottom:

</body>
</html>

of includes/gallery.php

whether that will cause stranger behaviour, I can't say without testing.

------------------------

I've gotta say, you paid too much to the wrong people for that implementation.. it's not very well done.

I will try and run a test of the files you attached tonight if I get some time...

Matt,

I cannot thank you enough! Taking that one line out seems to have done the trick... without causing any problems that I can see...

I know I overpaid, sadly enough. I am now looking to hire someone to clean the code and the database up.... Interested?

John

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.