473,320 Members | 1,978 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,320 software developers and data experts.

links in javascript

hi

I have more than one link in a html form.If I click anyone of the link then all other links should be disabled. how can i do it?
Aug 11 '07 #1
1 999
acoder
16,027 Expert Mod 8TB
Use getElementsByTagName("a") to get all the links and add:
Expand|Select|Wrap|Line Numbers
  1. onclick="return false;"
to disable the links. Pass the current link to the function to make sure that the current one is not disabled.
Aug 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Yvan J. Gagnon | last post by:
I am currenly developing a web site using Macromedia fireworks, and am trying to figure out a way (through hand-coding) of attaching a javascript function (onClick="doit=false") to each of the...
2
by: chris hughes | last post by:
Can anyone please tell me how to create a javascript that I can place in any page that will disable all the links or just change all the hrefs to # Many Thanks Chris Hughes
2
by: Konrad Mathieu | last post by:
Does this work in most browsers, namely MSIE? document.links.href or does it have to be document.links.href ?
9
by: chrisspencer02 | last post by:
I am looking for a method to extract the links embedded within the Javascript in a web page: an ActiveX component, or example code in C++/Pascal/etc. I am looking for a general solution, not one...
10
by: Trammel | last post by:
Hi, Im just about to start developing a new website for personal / friend use that may be accessed by other people all over the web. I was sitting thinking through designs for the pages, etc when...
1
by: nsvmani | last post by:
Hi, i am trying to get the FileOpen dialogue window as soon as clicked href link I am using IE6 with ActiveX enabled. Just need to get the File Open dialogue window when i click on the HREF links.It...
1
by: Gerald Shastri | last post by:
Hi, I have a page which is being generated by a CMS and I can't control the links which are being outputted. I want to add a target = "_parent" attribute to all the links on my page using...
0
iam_clint
by: iam_clint | last post by:
This is a list of offsite links with good information on them (if you have any links to add please pm me) Remember when looking for examples use examples from 2 or more sites if you are not sure...
2
by: learnyourabc | last post by:
For a webcrawler, you need to extract all links from the web page. For normal html anchor tags or any of the src and href attribute on the tag can be easily extracted using ihtmldocument. What...
0
by: Peter Horlock | last post by:
Hi, Using css (that should be working in Firefox 2,3 and Internet Explorer 6,7 at least), I would like to create the following: My Links: Link1 +show more links <!--- This is shown when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.