By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,168 Members | 696 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,168 IT Pros & Developers. It's quick & easy.

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

P: 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
Share this Question
Share on Google+
1 Reply

100+
P: 283
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

Post your reply

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