/    Sign up×
Community /Pin to ProfileBookmark

JavaScript causes IE to Crash

A simple line of javascript causes IE to crash, of coarse it only happens in IE – not FireFox – or others .

Operation Aborted

I am implementing the script on a Joomla Website I have published the script in every module position possible same problem. I also tried to put it directly on the index.php for the template, no luck. I have tried every module that lets me put custom java on modules for joomla same problem across the board.
Can someone please tell me if I can change the code a little or something that will make IE work.

<script src=”http://static.tracking202.com/lp/946029/landing.js” type=”text/javascript”></script>

Script is from tracking202 it tracks the inbound PPC traffic it works fine even on IE it tracks it but it closes the page with the operation aborted.

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@toicontienDec 22.2008 — Check to make sure no HTML tags are left unclosed. I've noticed this problem on some of my sites when users don't properly use BB code tags (and thus create broken HTML).

Check the rest of your Joomla page too. Some modules, namely ones from RocketTheme, cause this error sometimes because JavaScript is being added to the domready event before the HTML that JavaScript references appears in the HTML document. Happens with some Mootools stuff I think. Can you post a link to your page?

Also, I think if article body text is truncated in Joomla, it doesn't strip the HTML tags from it, so you could be introducing invalid HTML to the page that way.
Copy linkTweet thisAlerts:
@monchi954authorDec 22.2008 — Thanks for the help

Yea I am not using any of the mootools and but I am getting ready to go into the template and disable every script manually

the link to the page is http://smilewhitetoday.com
Copy linkTweet thisAlerts:
@toenailsinDec 22.2008 — this what i'm getting when i go to that page. you might want to fiddle with those slashes.

[htmL]<script src="http://static.tracking202.com/lp/945965/landing.js" type="text/javascript"/><script/>[/code]
Copy linkTweet thisAlerts:
@monchi954authorDec 22.2008 — this what i'm getting when i go to that page. you might want to fiddle with those slashes.

[htmL]<script src="http://static.tracking202.com/lp/945965/landing.js" type="text/javascript"/><script/>[/code][/QUOTE]



Yea i noticed the tiny editor (WYSWYG) was stripping code of when I saved it so i disabled it but this is right off the tracking202 site

[code=html]<script src="http://static.tracking202.com/lp/945965/landing.js" type="text/javascript"></script>[/code]

Is that not right??
Copy linkTweet thisAlerts:
@toicontienDec 23.2008 — That snippet of HTML looks correct. With Joomla, the more likely culprit is truncated article text, which introduces invalid markup to the page. Under certain conditions, this can cause an "Operation Aborted" error in Internet Explorer, if a JavaScript tries to add a child node to a parent node before the parent node has been fully parsed into memory. It's kind of a freak occurrence. Also, some RocketTheme special effects can cause this problem when adding functions to the domready event. I see the RokContentRotator script in your page:
[CODE]<script type="text/javascript">
window.addEvent('domready', function() {
[B]var crotator = new RokContentRotator({hover: true});[/B]
});
</script>
<div class="rok-content-rotator"><div class="rotator-2"><div class="rotator-3"><div class="rotator-4">
<div class="rotator-title">Smile It's FREE</div> <ul>
<li>
<h2><a class="rok-content-rotator-link" href="#">Risk Free Trial!</a></h2>

<div class="content">
<img src="/images/stories/offer3.jpg" border="0" alt="image" title="image" width="346" height="180" />
</div>
</li>
<li>
<h2><a class="rok-content-rotator-link" href="#">Easy and Fast to Use!</a></h2>
<div class="content">
<img src="/images/stories/offer2.jpg" border="0" alt="image" title="image" width="346" height="180" /><p> </p><p> </p>
</div>

</li>
<li>
<h2><a class="rok-content-rotator-link" href="#">Results Guranteed!</a></h2>
<div class="content">
<img src="/images/stories/offer4.jpg" border="0" alt="image" title="image" width="346" height="180" />
</div>
</li>
<li>
<h2><a class="rok-content-rotator-link" href="#">Improve your Apperance!</a></h2>

<div class="content">
<img src="/images/stories/offer5.jpg" border="0" alt="image" title="image" width="346" height="180" />
</div>
</li>
<li>
<h2><a class="rok-content-rotator-link" href="#">TRY IT!</a></h2>
<div class="content">
<img src="/images/stories/offer.jpg" border="0" alt="image" title="image" width="346" height="180" />
</div>

</li>
</ul>
</div></div></div></div>
[/CODE]

Try moving the window.addEvent function so it is below the "rok-content-rotator" DIV tag.
[CODE]<div class="rok-content-rotator"><div class="rotator-2"><div class="rotator-3"><div class="rotator-4">
...
</div></div></div></div>
[B]<script type="text/javascript">
window.addEvent('domready', function() {
[B]var crotator = new RokContentRotator({hover: true});[/B]
});
</script>[/B][/CODE]

I've had goofy problems in Joomla layouts caused by a JavaScript function that was added to the domready event, and the function referenced DOM nodes that hadn't been encountered in the HTML file yet.
Copy linkTweet thisAlerts:
@monchi954authorDec 23.2008 — Thanks for the help I got it working by adding it to the template at the bottom and put it there and it worked only problem is that this code suppose to only be on the landing page so I copied the template and assigned the copy to the other pages so only my main page has the script. I guess whats bad about that is more bandwidth since it has to Download the template lay out twice
[code=html] </div>
</div>
<!-- end footer -->
<script src="http://static.tracking202.com/lp/945965/landing.js" type="text/javascript"></script>
</body>
</html>[/code]
Copy linkTweet thisAlerts:
@toicontienDec 23.2008 — Why not make another module position at the very bottom of the page? Then you can insert custom HTML in that module.
Copy linkTweet thisAlerts:
@monchi954authorDec 23.2008 — Yea that's what I was going to start doing now

Is this the right code to include module ?

<?php if ($this->countModules('java')) : ?>

<div class="block">

<jdoc:include type="modules" name="java" style="xhtml" />

</div>

<?php endif; ?>
Copy linkTweet thisAlerts:
@monchi954authorDec 23.2008 — Thanks for all the help I finally got it working with a module I added it to the bottom where I had the script I just used a simple line I copied the same one they had for debug

<jdoc:include type="modules" name="java" style="none" />

and also added the module position to the xml file and now everything works.
×

Success!

Help @monchi954 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...