Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to disable a div in firefox?

 
preethi george
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had searched this forum but i cudnt find the solution..

the "document.getelementbyid.disabled=true " is not workin in firefox..

searched the net stil cant find a solution tat works..

can anyone help me asap
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to disable a div?

Or you are trying to hide a div?



This code could help you hide a div.

Ananth Chellathurai
 
preethi george
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i dont wanna hide it.. jus disable the radio buttons created in the div

ok the use case is!!
there are 2 radio buttons.. a and b ..
on clickin a table 1 sud b disabled and table 2 enabled..

on clickin b
table 1 disabled and table 2 enabled

 
preethi george
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it half way thru usin this code..

document.getElementById('unlimitedtab').addEventListener('click', function (event) { event.stopPropagation(); event.preventDefault(); return false }, true);

i really cant understand this code.. but it does the disabling part..
i now need to enable.. can it b done modifyin the abv code??
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Use Real Words

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A fair warning: That addEventListenerpart is not going to work in all browsers.

If you want to remove it, than you set the onclick to a blank function.

Eric




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic