Forums Register Login

ideas to disable button

+Pie Number of slices to send: Send
hi, i understand that the button can be disable by javascript , my question is let assume i have a form with 3 buttons ..i want to decide which button can be use by user though the user access level , and it will based on database data , is it possible i can pass some data into javascript to detected for button disability ?
+Pie Number of slices to send: Send
If it's based on information in a database, you can do it from the server.
Just add a " disabled " attribute to the button tag.

Better yet, if the user is never going to be able to click a given button anyway, don't show it to them.
+Pie Number of slices to send: Send
To add a small example to Ben's suggestion:


If the attribute 'permission' is set in the request (or session) the field is an input field that can be edited.
If the attribute is not set the value is presented as read only, the user never sees it as an editfield nor does he see the button.

bloody smilies
[ March 11, 2005: Message edited by: Jeroen Wenting ]
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1222 times.
Similar Threads
Disable browser buttons
Multiple request due to double click
Can a servlet forward 2 web pages?
Disable Back button on Internet Explorer
Browser Back Button
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:57:03.