473,651 Members | 3,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Howto Add a timeout to a javascript ad tag

My site with servers located on the West Coast runs ads served by an
adserver on the East Coast. A not infrequent problem occurs when a
user on the West Coast tries to load a page but for whatever reason
can't reach the adserver. It causes a portion or the entire page to
hang until the request times out. This can take up to 30 seconds or
more. Is there a way to set up a time frame which will drop the
request or route it to a local default file under these circumstances?

Here's an example of a current tag for a 468 x 60 banner:

<!-- CODE FOR TOP BANNER -->
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript1.1"
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_jx.cgi/www.rxlist.com/A%%ID%%@Top?top ic=%%CAT%%"></SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript"><!--_version=10;
//--> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript1.1">
<!--_version=11; // --> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript">
<!--if (navigator.appV ersion.indexOf( 'MSIE 3')>
-1){document.wri te('<IFRAME WIDTH=468 HEIGHT=60 MARGINWIDTH=0
MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no
BORDERCOLOR="#0 00000"
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_sx.cgi/www.rxlist.com/A%%ID%%@Top?top ic=%%CAT%%"></iframe>');}
else if (_version < 11) {document.write ('<A
HREF="http://ads.mdchoice.co m/RealMedia/ads/click_nx.cgi/www.rxlist.com/A%%ID%%@Top?top ic=%%CAT%%">'); document.write
('<img alt="
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_nx.cgi/www.rxlist.com/A%%ID%%@Top?top ic=%%CAT%%"
border=0 WIDTH=468 HEIGHT=60></a>');}// --></SCRIPT>
Thanks! -Neil

Jul 20 '05 #1
1 4405
Ivo
Looks like your page doesn't need any of the code you posted. If so, why not
remove all of this, and tell the page in one line of script to load the ad
scripts after it has finished loading.
Or remove the urls from the code, and set them dynamically onload.

"Neil Sandow" <rx@rxlist.co m> wrote in message
news:PI******** ************@ne wssvr14.news.pr odigy.com...
user on the West Coast tries to load a page but for whatever reason
can't reach the adserver. It causes a portion or the entire page to
hang until the request times out. This can take up to 30 seconds or
more. Is there a way to set up a time frame which will drop the
request or route it to a local default file under these circumstances?

Here's an example of a current tag for a 468 x 60 banner:

<!-- CODE FOR TOP BANNER -->
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript1.1"
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_jx.cgi/www.rxlist.com/A%
%ID%%@Top?topic =%%CAT%%"></SCRIPT> <SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript"><!--_version=10;
//--> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript1.1">
<!--_version=11; // --> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaS cript">
<!--if (navigator.appV ersion.indexOf( 'MSIE 3')>
-1){document.wri te('<IFRAME WIDTH=468 HEIGHT=60 MARGINWIDTH=0
MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no
BORDERCOLOR="#0 00000"
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_sx.cgi/www.rxlist.com/A%
%ID%%@Top?topic =%%CAT%%"></iframe>');} else if (_version < 11) {document.write ('<A
HREF="http://ads.mdchoice.co m/RealMedia/ads/click_nx.cgi/www.rxlist.com/A%%I
D%%@Top?topic=% %CAT%%">');docu ment.write ('<img alt="
SRC="http://ads.mdchoice.co m/RealMedia/ads/adstream_nx.cgi/www.rxlist.com/A%
%ID%%@Top?topic =%%CAT%%" border=0 WIDTH=468 HEIGHT=60></a>');}// --></SCRIPT>
Thanks! -Neil

Jul 20 '05 #2

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

Similar topics

5
7111
by: alejandro lapeyre | last post by:
How can I load / parse an HTML file with .NET? Thanks! Best regards, Alejandro Lapeyre
4
15459
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site | Properties | Configuration | Options | Enable Session State Session timeout 20 (3) within Global.asax.vb file - Session_Start subroutine can use Session.Timeout=x minutes or (4) within any web page, i.e., <web page>.aspx can use...
3
3797
by: steph_mw | last post by:
I have a web application and when a user opens the application (using windows integration) and loads some data, it loads a ID number into the session state. If for some reason they go away from their PC and come back after 20 mintes they are receiving an error. This error relates to the fact that the session has timed out and all session variables have been cleared. The only issue I have with this is that the session timeout is set to 24...
5
19393
by: Dave | last post by:
Hi All, Can anyone suggest a reliable solution to php redirect?: header("Location: $redir_url"); if the above times out in $timeout seconds header("Location: $alt_redir_url"); Many thanks,
7
9657
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
3
7590
by: Sems | last post by:
Hi I'm using the Session_End event in the global.asax to detect if a users sessions has ended. Is there any way to tell if the session end is due to it being expired and not abandoned? I'm trying to show the user a popup if their session has expired due to a timeout. Whats the best way to do this?
3
2714
by: Mufasa | last post by:
Folks, I'm having problems with my session timeout. People using my website leave it just sitting there while they do other things. They have logged in ( using Forms Authentication ) and will be doing other things will a page of mine is up on the screen. But the session times out so that when I try and use a session variable, it crashes saying Object reference not set to an instance of an object. So I put <sessionState timeout="4800" />
4
7178
by: goscottie | last post by:
I used submodal as my popup window. With some tweaks, it working great in my app. However, I can't find a way to detect session timeout in the popup window. The app is a form based authentication so the default.aspx page will show up in the popup. So I'm looking into several options. 1. detect session timeout in javascript so that I prevent the popup from even happening. I can simply redirect or post to itself so that the calling...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7299
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
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
2
1588
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.