Alexandre Rico 0 Posted September 6, 2019 Report Share Posted September 6, 2019 Olá, estou a iniciar-me em programação e toda a orientação é bem vinda 😊 Para já estou perante o seguinte problema que não consigo resolver: num formulário de ficha de cliente existe uma área de info extra que ao escrever caracteres eles são automáticamente removidos e eu pretendia precisamente o contrário que não fossem removidos. A virgula não é removida mas ao gravar desaparece. Alguem me pode ajudar? Muito obrigado o código no ficheiro php é este: </div> <div id='tabsfxc-3'> <div id="info_extra_fxc_cartao_place"></div> <div id="buttons_info_extra_place"> <a data-role="button" name="gravaFCInfoExtraBt" id="gravaFCInfoExtraBt" data-theme="c">GRAVAR</a> </div> </div> E no JS este: strinfo += '<label for="'+ this.nmcol +'" style="margin-top:10px;">'+ firstToUpperCase( this.nmcol ) +':</label>'; strinfo += '<input type="text" maxlength="50" onkeyup="this.value=strip_accents(this.value)" class="infoedit" value="'+ col_val +'" name="e'+ this.nmcol +'" id="e'+ this.nmcol +'" />'; }); } else { $("#buttons_info_extra_place").css('display', "none"); } info_extra.html(strinfo); $(".infoedit").textinput(); Link to post Share on other sites
M6 150 Posted September 10, 2019 Report Share Posted September 10, 2019 Parece-me que deve ser a função "strip_accents" que faz isso. Basta não a usares. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to post Share on other sites
Alexandre Rico 0 Posted September 10, 2019 Author Report Share Posted September 10, 2019 Olá! Retirei a função "strip_accents" mas não resolveu. Os caracteres continuam a serem removidos imediatamente no momento em que são escritos Obrigado Link to post Share on other sites
M6 150 Posted September 10, 2019 Report Share Posted September 10, 2019 Então tens de fazer um trace à execução do código para compreender onde tal acontece. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now