473,382 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Setting timeout on external javascript

-
Hi there All,

Don't know if this is possible at all, but here goes.

I've got a page (an active server page if that makes any difference), that
is pulling some sticky content from www.freesticky.com using the following
code:

<script type="text/JavaScript"
src="http://www.freesticky.com/stickyweb/syndicate/otd_events_hlines.asp"></
script>

The problem is that occasionally www.freesticky.com is unavailable, and so
is the stuff I'm trying to display. This in turn causes my page to hang.

Is it possible to set some kind of timeout, or something that will allow my
page to complete loading even if this stuff is not available.

Any help you could offer would be major cool.
Thanks,

@ndyB

Jul 23 '05 #1
2 4576
"-@-" wrote:
Hi there All,

Don't know if this is possible at all, but here goes.

I've got a page (an active server page if that makes any difference), that
is pulling some sticky content from www.freesticky.com using the following
code:

<script type="text/JavaScript"
src="http://www.freesticky.com/stickyweb/syndicate/otd_events_hlines.asp"></
script>

The problem is that occasionally www.freesticky.com is unavailable, and so
is the stuff I'm trying to display. This in turn causes my page to hang.

Is it possible to set some kind of timeout, or something that will allow my
page to complete loading even if this stuff is not available.

Any help you could offer would be major cool.

Thanks,

@ndyB


You can try setting DEFER on the <SCRIPT> tag:

<url:
http://msdn.microsoft.com/workshop/a...ties/defer.asp
/>

However, be aware that even if it works in a browser [1], it may produce other
errors if code in your own page relies on code that is defined in the file you
are sourcing for the script tag. I believe there's more to the use of DEFER, I
seem to recall some discussion about it here in the recent past, you might find
more information at <url:
http://groups.google.com/groups?q=sc...sa=G&scoring=d
/>.

Also, there's no guarantee it will prevent the browser from stalling if the host
from which the SRC is being loaded is unavailable, although it probably should.
[1] note what it says at <url:
http://www.w3.org/TR/REC-html40/interact/scripts.html />
defer [CI]: When set, this boolean attribute provides a hint to the user agent
that the script is not going to generate any document content (e.g., no
"document.write" in javascript) and thus, the user agent can continue parsing
and rendering.

The operative words in that explanation are "hint to the user agent".
--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #2
Hi,
I would stick that script link onto another file then use iframe or something
to show it on your site.
Kien

"-@-" <ab*@abc.com> wrote in message news:<40**********************@mercury.nildram.net >...
Hi there All,

Don't know if this is possible at all, but here goes.

I've got a page (an active server page if that makes any difference), that
is pulling some sticky content from www.freesticky.com using the following
code:

<script type="text/JavaScript"
src="http://www.freesticky.com/stickyweb/syndicate/otd_events_hlines.asp"></
script>

The problem is that occasionally www.freesticky.com is unavailable, and so
is the stuff I'm trying to display. This in turn causes my page to hang.

Is it possible to set some kind of timeout, or something that will allow my
page to complete loading even if this stuff is not available.

Any help you could offer would be major cool.
Thanks,

@ndyB

Jul 23 '05 #3

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

Similar topics

3
by: jason | last post by:
I have a function that <body onload=..> sets some form values. However when i execute that functionf from external js file, i get erorrs and it dont work. The function sets the fields via ...
2
by: dan_matthew | last post by:
hi, i'm trying to set a form value via an external js file. i don't know javascript extremely well but i do know programming in general. anyway, i thought this would be as easy as having a...
11
by: Frank Rizzo | last post by:
Hello, My c# based windows service takes a while to dispose. I have to release bunch of resources all over the place and unfortunately it can take 20-40 seconds before I can cleanly exit. ...
1
by: Scott Walters | last post by:
Hi, I have an asp.net webapp that uses some javascript in a hidden frame on the browser to poll the server every 30 seconds, using an http post. I also want my sessions to timeout in the...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
by: Barry | last post by:
Hello. I am in the process of modifying some JavaScript code which refers to an external stylesheet, but unfortunately I have very little previous JavaScript experience. Currently the code has only...
0
by: Chico Jayanthan | last post by:
Hi, I call an external windows program (.exe) from a python script. Something like os.system('test.exe'). I want to set a timeout for the external windows program to return. If no results are...
1
by: webotronics | last post by:
Hi, I need to add a timeout for external programs, as the external program sometimes never dies (it's a ClearQuest multisite call to the shipping server, that sometimes never ends, but simply...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.