473,398 Members | 2,113 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,398 software developers and data experts.

Im trying to get a link to disable when another is clicked

1
I am running a business and I have a forum on it but I do not want under 18's to access it due to that its for booking and to hire,

anyway what ive done is ive created a link that says "Leave (Iam not 18 or over)"
and this resolves in window.close,

example:

<html>

<body>
<p><a href="javascript:window.close();">Leave (I am not 18 or over)</a>
</p>
</body>

</html>

and a seperate href link which will say "I am 18 or over (Enter!)

but I want this href to disable when the window.close is clicked,

so when the window pops up to say the current page you are view-ing is trying to close click yes or no, If they click no the href should disable stopping them from accessing it.
Sep 6 '08 #1
1 1484
ajos
283 100+
I am running a business and I have a forum on it but I do not want under 18's to access it due to that its for booking and to hire,

anyway what ive done is ive created a link that says "Leave (Iam not 18 or over)"
and this resolves in window.close,

example:

<html>

<body>
<p><a href="javascript:window.close();">Leave (I am not 18 or over)</a>
</p>
</body>

</html>

and a seperate href link which will say "I am 18 or over (Enter!)

but I want this href to disable when the window.close is clicked,

so when the window pops up to say the current page you are view-ing is trying to close click yes or no, If they click no the href should disable stopping them from accessing it.
You need javaScript for this, ask this question here in our javaScript forum or do you want the mods to move this thread around?
Also i would like you to google around for such things, here's what i found.
google

regards,

ajos
Sep 7 '08 #2

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

Similar topics

4
by: KS | last post by:
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try...
5
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must...
3
by: Tim Streater | last post by:
I have, as it might be, this in a frame: <a href="mystuff.html">Click here</a> When I click the link, it loads mystuff.html into the frame, whereas what I want is to replace the whole window...
13
by: zn | last post by:
How can I cause a link on a page to open up a new browser window when the link is clicked on? I've noticed javascript code sometimes when I try to right-click a link and open it in another window....
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
0
by: Ahmad Jalil Qarshi | last post by:
Hi! I have a problem while developing some webpages.The Problem is that:- How We Can Disable The Controls Of One Web Form From Other Web Form In Asp.net? Explanation:- There Should Be Two...
2
by: prathna | last post by:
i have a hyper link when u click on the link it opens a new browser in a new window.how do i disable the link once the link is clicked.Thnaks for your help Thanks Prathna
3
by: =?Utf-8?B?UGxhdGVyaW90?= | last post by:
I have link buttons in a Gridview that, depending on the value in another column (Not the Key column) will need to be disabled. For example, (Column2 has link buttons) Column1 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
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
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...

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.