Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

не видит переменную twig


Anton1988
 Share

Recommended Posts

в файле twig :

   <input name="nameK" id="nameK" value="{{ client.name }}" style="display: none;" hidden />
                      

 

 

 

 

мне нужно вывести эту переменную тутже  пример alert(nameK); 

 

все ниже варианты не рилииют! липотому что пусто. иногда в других twig не в этот пишет undefined

var nameK =  {{ breadcrumb.text }};
// var nameK = document.getElementById("nameK").value;
 // var nameK = document.getElementsByName("nameK")[0].value;
 // var nameK = $('#productK').val();

alert(nameK);

 

 

Link to comment
Share on other sites


5 часов назад, Anton1988 сказал:

var nameK =  {{ breadcrumb.text }};

 

 

var nameK =  '{{ breadcrumb.text }}';

 

5 часов назад, Anton1988 сказал:

   <input name="nameK" id="nameK" value="{{ client.name }}" style="display: none;" hidden />
// var nameK = $('#productK').val();

 

var nameK = $('#nameK').val();

 

upd. мда, ну вы и наспамили на форуме. вам уже все разжевали же.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.