473,624 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I programmaticall y (javascript) check if link is valid in html?

How do I programmaticall y (javascript) check if link is valid in html?

Mar 7 '07 #1
3 15099
On Mar 7, 5:18 pm, "Chandra" <bschandramo... @gmail.comwrote :
How do I programmaticall y (javascript) check if link is valid in html?
Search for "Does a url exist?" at:

<URL: http://www.jibbering.com/2002/4/httprequest.html >
--
Rob

Mar 7 '07 #2
In comp.lang.javas cript message <11************ *********@p10g2 000cwp.goo
glegroups.com>, Wed, 7 Mar 2007 00:58:41, RobG <rg***@iinet.ne t.au>
posted:
>On Mar 7, 5:18 pm, "Chandra" <bschandramo... @gmail.comwrote :
>How do I programmaticall y (javascript) check if link is valid in html?

Search for "Does a url exist?" at:

<URL: http://www.jibbering.com/2002/4/httprequest.html >
So, on page load, an author can do various things amounting to a
probable abuse of resources.
OTOH, the code to check all the URLs on a page could be put in an
include file on an author's own machine, with a dummy version on the
author's public site; and that code could be actuated by a code-written
button so that it was not used too often. Such code could be published
for distribution by using /* ... */ to disable its workings. Has anyone
done that?
And HEAD can be used to find the Last-Modified date which is the well-
defined unambiguous form from which lastModified is derived often by the
removal of unambiguity. I've created temporary page
<URL:http://www.merlyn.demo n.co.uk/lastzmod.htm>
which uses it in addition and will replace last-mod.htm if all seems
well.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk DOS 3.3, 6.20 ; WinXP.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demo n.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demo n.co.uk/batfiles.htm- also batprogs.htm.
Mar 7 '07 #3
Dr J R Stockton said the following on 3/7/2007 9:43 AM:
In comp.lang.javas cript message <11************ *********@p10g2 000cwp.goo
glegroups.com>, Wed, 7 Mar 2007 00:58:41, RobG <rg***@iinet.ne t.au>
posted:
>On Mar 7, 5:18 pm, "Chandra" <bschandramo... @gmail.comwrote :
>>How do I programmaticall y (javascript) check if link is valid in html?
Search for "Does a url exist?" at:

<URL: http://www.jibbering.com/2002/4/httprequest.html >

So, on page load, an author can do various things amounting to a
probable abuse of resources.
That is true without using an httprequest. A clock, on a webpage, is a
"probable abuse of resources", and, it has nothing to do with whether it
is on page load or not.
OTOH, the code to check all the URLs on a page could be put in an
include file on an author's own machine, with a dummy version on the
author's public site; and that code could be actuated by a code-written
button so that it was not used too often. Such code could be published
for distribution by using /* ... */ to disable its workings. Has anyone
done that?
No because it doesn't make any sense. If you only want to show a user a
link if that server/URL is available then your testing doesn't satisfy
that need.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 8 '07 #4

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

Similar topics

4
8397
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties in JavaScript/JScript and HTML/XML elements. Without trying to get famous :-) but thinking it would be interesting to others I decided to post the following summary: 1. Variable names in JavaScript/JScript
5
2672
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one function to verify the name fields, age, email and gender. My question is: if I create a function for each field like the code below, what would be the best way to organize the functions and call them? Would I need one main function and place...
136
9296
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
5
6797
by: Carlo Marchesoni | last post by:
From an aspx page (A.aspx) I open another one (B.aspx - for table lookup). When the user selects an entry in B.aspx I would like to force a button's event in A.aspx to be fired. I guess the only way is using javascript - does anybody have a sample for this ? Thanks
18
7321
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further processing: function saveText( scroll_list, t_area, listToBeUpdated ) { scroll_list.options.text = t_area.text; scroll_list.options.value= t_area.value; var req; var url = "http://mkmxg00/cgi/confirmUpload.pl";
8
3653
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
29
2307
by: töff 93722 | last post by:
Long story short, I built a website based primarily on JavaScript: http://www.sjcga.com The site renders *great* in WinIE6/7 and in Mac/Win Opera9. It has problems in Mac/Win Firefox2, and in Safari(OSX) ... especially the Gallery, but the rightside menu is funky also. I've "validated" my scripts through a couple different systems, to no
8
3881
by: Chandra | last post by:
How do I programmatically (javascript) check if link is valid in html?
7
1494
by: Omicron | last post by:
Hello, I'm lost. Can some one go to the following site and click on the right-hand menu option named, Geneology. It is a Javascript link and will NOT do anything when my friend (who is running Vista) clicks on it. http://home.ptd.net/~ajs10 I'm not a Vista users and am not sure what I need to do to get it to
0
8625
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
8336
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
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7168
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...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
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
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1487
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.