0
I have an html code that is inserted into a PHP variable
And inside I look for zip code, if I use
<input alt='cep' class='text difCep' name='cep' id='cep' value='$cep' type='text' onblur='xajax_procurarEndereco(this.value);$(\"#loading\").css(\"visibility\",\"visible\");' />
It works well, but the user wants a search button, so I adapted the code and there’s the problem, I can’t get the value of zip. I tested with Document.getElementById("field") and $('#cep'). val();
<label id='label_cep' for='cep'>CEP</label>
<input alt='cep' class='text difCep' name='cep' id='cep' value='$cep' type='text' />
<button type='button' onclick='xajax_procurarEndereco(buscar input do cep);$("#loading").css("visibility","visible");' style="padding: 6px; height: 24px; margin-left: 10px;">Buscar</button>
It is best that you put the sample code directly in your answer, because if the link breaks in the future, your answer will no longer be as useful.
– Pedro Gaspar
I play all this within a php variable, will it be that this may be causing not searching for the value?
– Jonathan Halberstadt