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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wolf18
    New Member
    • Sep 2008
    • 1

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

    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="javascrip t: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.
  • ajos
    Contributor
    • Aug 2007
    • 283

    #2
    Originally posted by wolf18
    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="javascrip t: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

    Comment

    Working...