Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

issue in disabling all components inside div

 
Ranch Hand
Posts: 1137
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I am trying to disable all the components inside a div, but the issue i am facing is hyperlinks are not getting disabled, below is the code script i am using.



can someone please help how can disable everything inside the div?

also is there any way to disable the fieldset also?
 
Marshal
Posts: 67425
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anchor tags do not have a disabled attribute.
 
Punit Jain
Ranch Hand
Posts: 1137
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Anchor tags do not have a disabled attribute.



then how can i disable them?
what are the other ways?
 
Bear Bibeault
Marshal
Posts: 67425
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since they have no native disabled attribute, I guess that depends on what you mean by "disabled". But I assume you mean to make them non-responsive.

If you want to change how they look, use CSS. If you want to throw their clicks away, use a click handler.
 
Punit Jain
Ranch Hand
Posts: 1137
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Since they have no native disabled attribute, I guess that depends on what you mean by "disabled". But I assume you mean to make them non-responsive.

If you want to change how they look, use CSS. If you want to throw their clicks away, use a click handler.



yes i need to make them unresponsive.

 
Bear Bibeault
Marshal
Posts: 67425
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Punit Jain wrote:yes i need to make them unresponsive.



Well, then:

Bear Bibeault wrote:If you want to change how they look, use CSS. If you want to throw their clicks away, use a click handler.

 
Why is the word "abbreviation" so long? And this ad is so short?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic