cristina Posted January 5, 2010 Share Posted January 5, 2010 Hey.Sper ca ma poate ajuta cineva. Am de modificat authentication.tpl pentru ca un client sa aiba posibilitatea sa aleaga daca e persoana fizica sau juridica. Daca e juridica atunci trebuie sa introduca CUI-ul. Dupa ce a introdus cui-ul atunci merge pe un php script care imi scoate datele despre firma de pe mfinante.ro.Chestia asta vreau sa o fac cu un ajax, care imi apeleaza scriptul meu. Singura chestie e ca in momentul in care adaug:si cele ce imi mai trebuie, nu imi mai afiseaza nimic din authentication.tpl. Am incercat sa ii dau:[removed] dar in momentul asta nici categoriile nu mi le mai afiseaza.Deci care ar putea fi solutia?Am adaugat codul mai jos:function getXMLHttp(){ var xmlHttp try { //Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch(e) { //Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("Your browser does not support AJAX!") return false; } } } return xmlHttp;}function MakeRequest(){ var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("POST", "pro.php", true); xmlHttp.send(null);}function HandleResponse(response){ document.getElementById('ResponseDiv')[removed] = response;} {l s='Persoana juridica:'} {l s='Introduceti CUI:'} <input type="text" class="text" id="cui" name="cui" value="{if isset($smarty.post.cui)}{$smarty.post.cui}{/if}" /> <input type="button" name="submitCui" id="submitCui" value="{l s='Submit CUI'}" class="exclusive">Cheers! Link to comment Share on other sites More sharing options...
Radu Posted January 13, 2010 Share Posted January 13, 2010 poate ai o eroare pe undeva si in config/config.inc.php ai setat sa nu arate erorile:@ini_set('display_errors', 'off');dar functia javascript o poti introduce intre taguri:{literal}{/literal}astfel smarty nu-ti va mai da erori Link to comment Share on other sites More sharing options...
cristina Posted January 14, 2010 Author Share Posted January 14, 2010 Buna!Multumesc de raspuns. Mi-am dat si eu seama ca trebuia cu {literal}, dar numai a doua zi. Stii cum e cu programarea asta: te blochezi pe cate o chichita si abia iti poti da seama care e exact problema.Cristina Link to comment Share on other sites More sharing options...
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