Recommend this page to a friend! |
|
1 - 10 | 11 - 17 |
![]() I'm having trouble with the class form_mysql_auto_complete_class. The browser is returning some errors:
[13/6/2012 17:24:52] CSS - http://site/servicos/cadastro_equipamentos_fg.php?___event=submit&___input=p_complete_id_unidade__ajax HTML style attribute Invalid value for property: visibility Line 1: :30px;height:10px;visibility:hidden;font-size:7px;color:#d0d0d0;visibility:show; --------------------------------------------------------------------------------^ [13/6/2012 17:24:53] CSS - http://site/servicos/cadastro_equipamentos_fg.php?___event=getoptions&___input=id_equipamento_pai&___group=LDA HTML style attribute Invalid value for property: visibility Line 1: :30px;height:10px;visibility:hidden;font-size:7px;color:#d0d0d0;visibility:show; --------------------------------------------------------------------------------^ When I run Opera in the error does not affect in the following fields, but when run in Firefox and IE the next field that needs the result of selection does not find the value to search the linked group. Will I'm doing something wrong? code: ... $form->AddInput(array( 'TYPE'=>'custom', 'ID'=>'complete_id_unidade', 'NAME'=>'complete_id_unidade', 'CustomClass'=>'form_pgsql_auto_complete_class', 'CompleteInput'=>'id_unidade', 'CompleteMinimumLength'=>1, 'Dynamic'=>1, 'ShowButton'=>'mostra_unidades', "Connection"=>'ServicosConnection', "CompleteValuesQuery"=>"SELECT id_unidade FROM unidades WHERE lower(id_unidade) {BEGINSWITH} ORDER BY id_unidade", "CompleteValuesLimit"=>10, 'FeedbackElement'=>'complete_id_unidade_feedback', 'SubmitFeedback'=>' <img src="../_phplib_/FormGeneration/indicator.gif" width="16" height="16" alt="Procurando Unidades" title="Procurando Unidades" /> ', 'CompleteFeedback'=>' <img src="../_phplib_/FormGeneration/indicator.gif" width="16" height="16" style="visibility: hidden;" /> ', )); $form->AddInput(array( "TYPE"=>"custom", "ID"=>"id_equipamento_pai", "NAME"=>"id_equipamento_pai", "LABEL"=>"Equipamento <u>P</u>ai", "ACCESSKEY"=>"P", "CustomClass"=>"form_pgsql_linked_select_class", "Connection"=>'ServicosConnection', "GroupsQuery"=>"SELECT id_unidade FROM unidades", "OptionsQuery"=>"SELECT id_equipamento FROM equipamentos WHERE id_unidade={GROUP} ORDER BY id_equipamento", "DefaultOption"=>"", "DefaultOptionValue"=>"Selecione Equipamento Pai", "Dynamic"=>1, "VALUE"=>$id_equipamento_pai, "LinkedInput"=>"id_unidade", "AutoWidthLimit"=>0, "AutoHeightLimit"=>0, "ValidateAsNotEmpty"=>1, "ValidationErrorMessage"=>"Não é um equipamento válido.", )); ... body: <center><table summary="Input fields table"> <tr> <th align="right"><?php $form->AddLabelPart(array('FOR'=>'id_unidade')); ?></th> <td><?php $form->AddInputPart('id_unidade'); $form->AddInputPart('complete_id_unidade'); ?><span id="complete_id_unidade_feedback"></span></td> </tr> <tr> <th align="right"><?php $form->AddLabelPart(array('FOR'=>'id_equipamento_pai')); ?></th> <td><?php $form->AddInputPart('id_equipamento_pai'); ?></td> </tr> <td align="center"><?php if(IsSet($verify["id_equipamento_pai"])) { ?> [Verify] <?php } ?></td> ...
![]() The CSS visibility property cannot be show, you probably mean visible.
Anyway you should not be messing with that property for the menu style because it interferes with the actions of making the menu open and close.
![]() Manuel, I found where was the wrong definition of visibility, even eliminating the error field with class "form_pgsql_linked_select_class" still does not work in IE and Firefox but Opera is perfect.
I noticed that in Opera when I make a tab on the field with class 'form_pgsql_auto_complete_class' the focus goes to the button that shows all the options, and in IE and Firefox the focus disappears and after another tab the focus go to the button that shows all options. IE and Firefox identifies an object between the field and button? Would any way to find where is the problem? Thanks
![]() It is hard to understand what you mean. Can you put a minimal example running in a Web page so I can see what you mean?
![]() Manuel
If you can look at this link, you will see that in Opera you select a 'unidade' and opens the list in the field below, but in IE and Chrome does not work the link. If you press tab in 'unidade' field, the focus goes to the button, but in IE and Chrome the focus disappears. 200.186.208.43:88/servicos/cadastro ...
![]() I cannot see this working in any browser.
I think you are having SQL errors but since the database interaction is going through AJAX requests, you cannot see the errors on the page. Try enabling the PHP error log file in php.ini and take a look at what appears in the error log to see what database errors are happening. php.net/manual/en/errorfunc.configu ...
![]() Manuel
But if there were errors in SQL, not work in Opera, is not it? The queries are returning the expected results in my logs. I did some more tests and noticed that in access logs php, web browsers, which are not working, do not enter into 'event getoptions =' of javascript, which assembles the list on the form. Opera already runs (passes) this event, as copied below. I'll keep looking, but if you have any idea what might be wrong, I appreciate it. logs= Opera e IE: [19/Jun/2012:15:35:08 -0300] "POST /servicos/cadastro_equipamentos_fg.php?___event=submit&___input=p_complete_id_unidade__ajax HTTP/1.1" 200 864 somente Opera: [19/Jun/2012:15:35:09 -0300] "GET /servicos/cadastro_equipamentos_fg.php?___event=getoptions&___input=id_equipamento_pai&___group=LDA HTTP/1.1" 200 16347
![]() It is hard for me to tell because you are using a variant of the auto-complete plug-in for which I do not have the code. So my supposition that there some database access errors is just a guess. It may be true or not.
It would help to figure the problem if you enabled PHP error logs. You provided Apache logs, but those are not very useful because they do not reveal any PHP errors. I suggest that you add these lines to your php.ini file: error_reporting = E_ALL display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 0 ignore_repeated_errors = On ignore_repeated_source = Off report_memleaks = On track_errors = On html_errors = Off error_log = /path/to/php_error_log Obviously you need to change /path/to/php_error_log to some path that is suitable to set the PHP error log file. Then restart the Web server and run the script again. Just let me know if they reveal any errors triggered during the execution of the script.
![]() Manuel
The logs returned some errors listed below. But I understand why you say that did not work in any browser in your tests. When I use the button to open the list of options, the link does not really work with the next field. But when I type an option in Opera it updates the linked field. There may be something with the javascript events? Can I send the fonts for you take a look? the logs shows: [Wed Jun 20 15:25:04 2012] [error] [client ip] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/servicos/cadastro_equipamentos_fg.php:29) in /var/www/_phplib_/FormGeneration/form_ajax_submit.php on line 282, referer: http://pagina ip/servicos/cadastro_equipamentos_fg.php [Wed Jun 20 15:24:58 2012] [error] [client ip] PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/servicos/cadastro_equipamentos_fg.php:29) in /var/www/_phplib_/FormGeneration/form_linked_select.php on line 313, referer: http://pagina ip/servicos/cadastro_equipamentos_fg.php Thanks again.
![]() Those errors are preventing it to work. It is not just in Opera. Here it does not work in any browser.
You need to see in line 29 of cadastro_equipamentos_fg.php something that generating page output. That is generating some output, maybe script errors displayed to the page, and that prevents the JavaScript code generated by the forms class AJAX plug-in to be sent to the browser. That is why it does not work. |
1 - 10 | 11 - 17 |
info at phpclasses dot org
.