PHP Classes

How to disable a button image to load the page

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  How to disable a button image to...  >  (Un) Subscribe thread alerts  
Subject:How to disable a button image to...
Summary:How to disable a button image to load the page
Messages:2
Author:Pedro Alcaraz
Date:2008-08-15 11:25:01
Update:2008-08-19 06:10:30
 

  1. How to disable a button image to...   Reply   Report abuse  
Picture of Pedro Alcaraz Pedro Alcaraz - 2008-08-15 11:25:02
Hi, congratulations to Manuel for his fantastic work

I'm trying to load a form with the submit button, disabled.

To this end I am using this code:

The button definition is:

$error = $form->AddInput(array(
'TYPE'=>'image',
'NAME' => 'bEnviar',
'ID'=>'bEnviar',
'SRC'=>'button_continue.gif',
'ALT' => 'Alta de socio',
'Accessible' => 1
));

$form->ConnectFormToInput('bEnviar','ONLOAD','Disable',array());

$onload=$form->PageLoad();
?>

<html>
<head>
</head>
<body onload="<?php echo $onload; ?>">

The javascript generated is:

if(document.getElementById('create_account')['bEnviar'].disabled && typeof(document.getElementById('create_account')['bEnviar'].disabled)=='boolean')
document.getElementById('create_account')['bEnviar'].disabled=false;

How can I make the property "disabled" is true?

Thanks
Pedro Alcaraz

  2. Re: How to disable a button image to...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-08-19 06:10:30 - In reply to message 1 from Pedro Alcaraz
There was a bug in the Javascript generated by the class to disable inputs. A new fixed version was just uploaded. Thank you for reporting.