473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Disable (grey out) a button.

Hi,

Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on
top (this adds object orientation?).

I don't seem to find a xoops Usenet group?

Whatever the case (and presumably a Xoops property): how does one disable
(grey-out) a button?

Hope someone can help.

pat

Mar 13 '06 #1
4 18610

Patrick Flaherty wrote:
Hi,

Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on
top (this adds object orientation?).

I don't seem to find a xoops Usenet group?

Whatever the case (and presumably a Xoops property): how does one disable
(grey-out) a button?

Hope someone can help.

pat


Not sure if this is what you mean, ('cause it's not PHP related) but i
think it's this what you wnat:
<input type="submit" name="Submit" value="Submit" id="Submit" disabled>
hence 'disabled'.

Frizzle.

Mar 13 '06 #2
NC
Patrick Flaherty wrote:

Experienced programmer but new to PHP. Moreover I'm to use PHP
with Xoops on top (this adds object orientation?).

I don't seem to find a xoops Usenet group?
There's a support forum:

http://www.xoops.org/modules/newbb/

But I see that you already posted there...
Whatever the case (and presumably a Xoops property): how does one
disable (grey-out) a button?


The easiest way to disable a button is not to show it in the first
place. This is HTML, not desktop programming; a button is either a
submit button or a reset button. There is no such thing as a "do
nothing" button (unless it is defined outside a form). You can
override the button's default behavior using JavaScript's onClick event
hadler, but if the client has JavaScript disabled, the default behavior
will still occur.

Cheers,
NC

Mar 13 '06 #3
In article <11**********************@i39g2000cwa.googlegroups .com>, NC says...

Patrick Flaherty wrote:

Experienced programmer but new to PHP. Moreover I'm to use PHP
with Xoops on top (this adds object orientation?).

I don't seem to find a xoops Usenet group?


There's a support forum:

http://www.xoops.org/modules/newbb/

But I see that you already posted there...
Whatever the case (and presumably a Xoops property): how does one
disable (grey-out) a button?


The easiest way to disable a button is not to show it in the first
place. This is HTML, not desktop programming; a button is either a
submit button or a reset button. There is no such thing as a "do
nothing" button (unless it is defined outside a form). You can
override the button's default behavior using JavaScript's onClick event
hadler, but if the client has JavaScript disabled, the default behavior
will still occur.

Cheers,
NC


Thanx for your responses,

I'm actually asking on behalf of two other programmers here (at my company) who
are supposed to be more experienced Web/PHP programmers than myself.

Or rather one knows PHP/Xoops quite well. The other one PHP but not Xoops. The
first guy is out at the moment and the second (who has to actually do the work)
keeps insisting that this (disabling a button) must be a Xoops object property.

I guess it's a Submit button in the sense that we want the button initially
greyed out. Then once the user has filled in the required fields the button
will detect this and become Active.

And then clicking it will launch a perl script (that will reach over to another
platform [VMS] and generate a bunch of text data files).

My idea of Web programming (probaby primitive) is html and javascript (or ASPs).
Since, however, the platform we're given is all PHP/Xoops this considerably
muddies the waters for me.

pat

Mar 13 '06 #4
Patrick Flaherty wrote:
In article <11**********************@i39g2000cwa.googlegroups .com>, NC says...

Patrick Flaherty wrote:

Experienced programmer but new to PHP. Moreover I'm to use PHP
with Xoops on top (this adds object orientation?).

I don't seem to find a xoops Usenet group?


There's a support forum:

http://www.xoops.org/modules/newbb/

But I see that you already posted there...
Whatever the case (and presumably a Xoops property): how does one
disable (grey-out) a button?


The easiest way to disable a button is not to show it in the first
place. This is HTML, not desktop programming; a button is either a
submit button or a reset button. There is no such thing as a "do
nothing" button (unless it is defined outside a form). You can
override the button's default behavior using JavaScript's onClick event
hadler, but if the client has JavaScript disabled, the default behavior
will still occur.

Cheers,
NC

Thanx for your responses, I'm actually asking on behalf of two other programmers here (at my company) who are supposed to be more experienced Web/PHP programmers than myself. Or rather one knows PHP/Xoops quite well. The other one PHP but not Xoops. The first guy is out at the moment and the second (who has to actually do the work) keeps insisting that this (disabling a button) must be a Xoops object property.
I guess it's a Submit button in the sense that we want the button initially
greyed out. Then once the user has filled in the required fields the button
will detect this and become Active. And then clicking it will launch a perl script (that will reach over to another platform [VMS] and generate a bunch of text data files). My idea of Web programming (probaby primitive) is html and javascript (or ASPs). Since, however, the platform we're given is all PHP/Xoops this considerably
muddies the waters for me. pat


Hey Pat,

Why not have this programmed on the VMS box using Apache/mod_php/mod_perl?
I have a vms box that does this natively.

As for the greyed-out button, this would need to be handled via javascript
do a search on javascript disable button. you will find a link like:
http://www.codetoad.com/javascript_validate_disable.asp

Just remember - you have to take into consideration what happens when
javascript is disabled - some people do no like it and will never enable
it...

Mar 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: KS | last post by:
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try...
1
by: J Belly | last post by:
Hi, I have a table of questions (with radio buttons) that I want to appear greyed out so that users can feel they can skip it and go on to the next page. But if they should choose to answer the...
2
by: tottigang | last post by:
Hi, I have a tabstrip and I have some tabs in it. On the first page, all the tabs are enabled, I need to disbale part of the tabs at a specific point in the application and again enable them. I...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
4
by: Tom | last post by:
Hi: When you disable a text box you get the "ghost effect" on the associated label control. How can you mimic that same effect on a label not associated with a text box? Basically, the setup...
5
by: soni2926 | last post by:
Hi, I was wondering, how to make a site grey out, something like this: http://www.lancome-usa.com/makeup/foundations.aspx if you put your mouse over a shade like 'Absolute Pearl 05' you'll get a...
2
by: y2ktan | last post by:
Hi Guys and Girls, I am building a windows application using VS2005, C#.net. Now, I have a combo box that contains a collection of elements. Thus, I want to grey out some of the elements in the...
2
by: Claudia Fong | last post by:
Hi, I added a tabcontrol in a panel in my form. My tabcontrol have more than 3 pages.. each page contains textboxes, combobox, checkbox. I want to disable the items of each of the page of...
3
by: Venturini | last post by:
I am trying to put together a web page where the customer makes choices of products and is then given a total. I am extremely new to Javascript and have managed to get as far as I have from web...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.