Connecting Tech Pros Worldwide Forums | Help | Site Map

Disable (grey out) a button.

Patrick Flaherty
Guest
 
Posts: n/a
#1: Mar 13 '06
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

frizzle
Guest
 
Posts: n/a
#2: Mar 13 '06

re: Disable (grey out) a button.



Patrick Flaherty wrote:[color=blue]
> 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[/color]

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.

NC
Guest
 
Posts: n/a
#3: Mar 13 '06

re: Disable (grey out) a button.


Patrick Flaherty wrote:[color=blue]
>
> 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?[/color]

There's a support forum:

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

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

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

Patrick Flaherty
Guest
 
Posts: n/a
#4: Mar 13 '06

re: Disable (grey out) a button.


In article <1142281486.128350.236640@i39g2000cwa.googlegroups .com>, NC says...[color=blue]
>
>Patrick Flaherty wrote:[color=green]
>>
>> 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?[/color]
>
>There's a support forum:
>
>http://www.xoops.org/modules/newbb/
>
>But I see that you already posted there...
>[color=green]
>> Whatever the case (and presumably a Xoops property): how does one
>> disable (grey-out) a button?[/color]
>
>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
>[/color]

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

noone
Guest
 
Posts: n/a
#5: Mar 13 '06

re: Disable (grey out) a button.


Patrick Flaherty wrote:
[color=blue]
> In article <1142281486.128350.236640@i39g2000cwa.googlegroups .com>, NC[/color]
says...[color=blue][color=green]
>>
>>Patrick Flaherty wrote:[color=darkred]
>>>
>>> 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?[/color]
>>
>>There's a support forum:
>>
>>http://www.xoops.org/modules/newbb/
>>
>>But I see that you already posted there...
>>[color=darkred]
>>> Whatever the case (and presumably a Xoops property): how does one
>>> disable (grey-out) a button?[/color]
>>
>>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
>>[/color][/color]
[color=blue]
> Thanx for your responses,[/color]
[color=blue]
> I'm actually asking on behalf of two other programmers here (at my company)[/color]
who[color=blue]
> are supposed to be more experienced Web/PHP programmers than myself.[/color]
[color=blue]
> Or rather one knows PHP/Xoops quite well. The other one PHP but not Xoops.[/color]
The[color=blue]
> first guy is out at the moment and the second (who has to actually do the[/color]
work)[color=blue]
> keeps insisting that this (disabling a button) must be a Xoops object[/color]
property.
[color=blue]
> 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.[/color]
[color=blue]
> And then clicking it will launch a perl script (that will reach over to[/color]
another[color=blue]
> platform [VMS] and generate a bunch of text data files).[/color]
[color=blue]
> My idea of Web programming (probaby primitive) is html and javascript (or[/color]
ASPs).[color=blue]
> Since, however, the platform we're given is all PHP/Xoops this considerably
> muddies the waters for me.[/color]
[color=blue]
> pat[/color]

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...



Closed Thread