Current location: Hot Scripts Forums » General Web Coding » JavaScript » Is it possible 2 stop a javascript function w/ other jv command?


Is it possible 2 stop a javascript function w/ other jv command?

Reply
  #1 (permalink)  
Old 01-19-05, 08:31 AM
noni noni is offline
New Member
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Is it possible 2 stop a javascript function w/ other jv command?

Hello ppl!

Can anyone help me out with this question?

Is it possible to block/stop a javascript function w/ other javascript command? How?

I got the following javascript code (it's an auto-adbox that apears - before the pages' <html> tag - every time the page w/ the code is loaded). I'd like to block/stop this code w/ other javascript code in the same page. Is it possible?

Ps.: Unfortunetly I can't erase/delete the "auto-adbox code" due to function reasons.

The "auto-adbox" code:

Quote:
<HEAD>
<style type="text/css">
#adsbox{
position:absolute;
align: center;
left: 0;
top: -600px;
padding: 1px;
z-index: 100;
visibility:hidden;
}
</style>
<script type="text/javascript"><!--
var delay__time = 25;

function showadsbox()
{
var ie=document.all && !window.opera;
var dom=document.getElementById;
iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
objref=(dom)? document.getElementById("adsbox") : document.all.adsbox;
var docwidth=(ie)? iebody.clientWidth : window.innerWidth;
docheight=(ie)? iebody.clientHeight: window.innerHeight;
var objwidth=objref.offsetWidth;
objheight=objref.offsetHeight;
objref.style.left=docwidth/2-objwidth/2+"px";
objref.style.top= document.body.clientHeight -110;
if (objref.filters)
{
objref.filters[0].duration=0.8;
objref.filters[0].Apply();
objref.filters[0].Play();
}
objref.style.visibility="visible";
if (objref.style.MozOpacity) mozfadevar=setInterval("mozfadeads()", 90);
else setTimeout("hideadsbox()", (objref.filters)? (delay__time+objref.filters[0].duration)*1000 : delay__time*1000);
}

function mozfadeads()
{
if (parseFloat(objref.style.MozOpacity)<1) objref.style.MozOpacity=parseFloat(objref.style.Mo zOpacity)+0.5;
else
{
clearInterval(mozfadevar);
setTimeout("hideadsbox()", (objref.filters)? (delay__time+objref.filters[0].duration)*1000 : delay__time*1000);
}
}

// please NOTE function names and variables change every few months!
// Making it NOT worth your efforts to hack this script!! Sorry.
function hideadsbox()
{
objref.style.visibility="hidden";
}

function initads()
{
setTimeout("showadsbox()", 100);
}
if (window.addEventListener) window.addEventListener("load", initads, false);
else if (window.attachEvent) window.attachEvent("onload", initads);
else if (document.getElementById) window.onload=initads;
// --></script>

<html>
...then starts the page source code...


Any help is welcome!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-19-05, 12:48 PM
noni noni is offline
New Member
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
problem solved...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
execute php into javascript function Hagoromo PHP 3 05-23-07 03:19 AM
PHP Error Fairnie PHP 8 06-26-04 08:15 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 11:15 AM
Execute javascript function based on selected dropdown list value. TKOEHN5751 JavaScript 2 03-14-04 01:13 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 10:50 AM


All times are GMT -5. The time now is 10:56 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.