473,503 Members | 12,003 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="JavaScript1.1"
SRC="http://ads.mdchoice.com/RealMedia/ads/adstream_jx.cgi/www.rxlist.com/A%%ID%%@Top?topic=%%CAT%%"></SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript"><!--_version=10;
//--> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript1.1">
<!--_version=11; // --> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript">
<!--if (navigator.appVersion.indexOf('MSIE 3')>
-1){document.write('<IFRAME WIDTH=468 HEIGHT=60 MARGINWIDTH=0
MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no
BORDERCOLOR="#000000"
SRC="http://ads.mdchoice.com/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.com/RealMedia/ads/click_nx.cgi/www.rxlist.com/A%%ID%%@Top?topic=%%CAT%%">');document.write
('<img alt="
SRC="http://ads.mdchoice.com/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 #1
1 4395
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.com> wrote in message
news:PI********************@newssvr14.news.prodigy .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="JavaScript1.1"
SRC="http://ads.mdchoice.com/RealMedia/ads/adstream_jx.cgi/www.rxlist.com/A%
%ID%%@Top?topic=%%CAT%%"></SCRIPT> <SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript"><!--_version=10;
//--> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript1.1">
<!--_version=11; // --> </SCRIPT>
<SCRIPT TYPE='text/javascript' LANGUAGE="JavaScript">
<!--if (navigator.appVersion.indexOf('MSIE 3')>
-1){document.write('<IFRAME WIDTH=468 HEIGHT=60 MARGINWIDTH=0
MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no
BORDERCOLOR="#000000"
SRC="http://ads.mdchoice.com/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.com/RealMedia/ads/click_nx.cgi/www.rxlist.com/A%%I
D%%@Top?topic=%%CAT%%">');document.write ('<img alt="
SRC="http://ads.mdchoice.com/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
7103
by: alejandro lapeyre | last post by:
How can I load / parse an HTML file with .NET? Thanks! Best regards, Alejandro Lapeyre
4
15444
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...
3
3785
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...
5
19375
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
9643
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...
3
7575
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...
3
2702
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...
4
7161
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...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7264
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,...
0
7316
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...
1
6975
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...
0
5562
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,...
0
4666
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...
0
3160
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...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
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...

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.