I want to disable a table with javascript. In this table i have 'n'
record and each record has 3 buttons. If you click a button does an
action. I want to disable the all table.
is there any way to disable all this table without have to disable each
button of each record?
Thanks 8 25162
Hi,
prado wrote: I want to disable a table with javascript. In this table i have 'n' record and each record has 3 buttons. If you click a button does an action. I want to disable the all table.
is there any way to disable all this table without have to disable each button of each record?
Thanks
No, you cannot disable all of them in one operation. However, you can
get an array of elements using document.getElementsByTagName. Or, you
can give your buttons a clever ID and use many document.getElementById
calls. But at one point or the other, you'll have to loop through the
elements to identify them and disable them.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
"Laurent Bugnion" wrote prado wrote: is there any way to disable all this table without have to disable each button of each record?
No, you cannot disable all of them in one operation. However, you can get an array of elements using document.getElementsByTagName. Or, you can give your buttons a clever ID and use many document.getElementById calls. But at one point or the other, you'll have to loop through the elements to identify them and disable them.
Are you sure? Wouldn't the same effect be had if the whole table is wrapped
in <form></form> tags and the form is disabled as one?
hth
ivo http://4umi.com/web/javascript/
Can you put an example if this, please.
"prado" wrote is there any way to disable all this table without have to disable each button of each record? Can you put an example if this, please.
Sure, see here: http://4umi.com/web/javascript/tableable.htm
btw, please quote some of what you're replying to, that makes it easier for
the newsgroup to follow the discussion.
hth
ivo
"Laurent Bugnion" wrote Ivo wrote: "Laurent Bugnion" wroteprado wrote: is there any way to disable all this table without have to disable each button of each record?
No, you cannot disable all of them in one operation. However, you can get an array of elements using document.getElementsByTagName. Or, you can give your buttons a clever ID and use many document.getElementById calls. But at one point or the other, you'll have to loop through the elements to identify them and disable them.
Are you sure? Wouldn't the same effect be had if the whole table is wrapped in <form></form> tags and the form is disabled as one?
<form> doesn't have a "disabled" attribute. The code at http://4umi.com/web/javascript/tableable.htm is not standard, and thus doesn't work in Firefox.
Darn, you 're right. I just noticed in IE even when a button looks disabled
and is grayed out in a "disabled" form, a click still fires its onclick
event handler function... This really shouldn't be happening! Yet another
dream shattered.
ivo
Hi,
Ivo wrote: Are you sure? Wouldn't the same effect be had if the whole table is wrapped in <form></form> tags and the form is disabled as one?
<form> doesn't have a "disabled" attribute. The code at http://4umi.com/web/javascript/tableable.htm is not standard, and thus doesn't work in Firefox.
Darn, you 're right. I just noticed in IE even when a button looks disabled and is grayed out in a "disabled" form, a click still fires its onclick event handler function... This really shouldn't be happening! Yet another dream shattered. ivo
The fact that IE supports so many incompatible, non-standard "features"
is the biggest plague in the world of web software engineering.
IE7 will be much better from what I heard and saw at MIX06, but
unfortunately they have to support the old stuff or else the web will
stop working...
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nntp |
last post by:
I have a set of links which I want search engines to crawl them, but I want
to disable them from my visitors, so I will ask the link owners to pay me to
let me enable them.
<a disabled...
|
by: Forti2ude |
last post by:
Hello,
I have a simple form...
<form>
<select name="foo" multiple>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
|
by: talal |
last post by:
How to check whether javascript is enable or disable in client browser.
Remeber i can check wheter browser client support javascript with
BrowserCapability class. But what if the client has disable...
|
by: Bob |
last post by:
Does anyone know how to disable javascript in the new Netscape 8 -- for
off line testing (like can be done readily with the current MSIE,
Firefox or Opera browsers) ?
When I try tools -> options...
|
by: Mike |
last post by:
I have a form that contains 240 "products". Each Product has a TR. Each TR
contains a Yes and No radio button and a Product-Qty text input.
A situation exists where I have to go through all the...
|
by: SteveKlett |
last post by:
I have a subset of form items that I need to perform different
operations on (enable/disable, clear values, change style, etc)
rather than hard code the IDs or names I would like to recursively...
|
by: bhanubalaji |
last post by:
hi,
I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA..
can any one help regarding this..
What's the wrong with my code?
I am...
|
by: alamodgal |
last post by:
hiiiiiiiiiii everybody,
pls solve my problem if u can?
Actualy what happens in my site when i press enter key it will show some secured...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
| |