Bonjour,
J'ai un petit soucis avec un bout de code javacript/smarty.
Voila mon code :
Donc bien sur, ca ne marche pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <select name={$m_product_options[m_product_options][m_product_options2].classtext}{$matching[m_product].productid} onchange="if(form.color{$matching[m_product].productid}.selectedIndex != 0) {literal}{{/literal} if(form.size{$matching[m_product].productid}.selectedIndex != 0) {literal}{ {/literal} {assign var="colorIndex" value=form.color{$matching[m_product].productid}.selectedIndex-1} {assign var="sizeIndex" value=form.size{$matching[m_product].productid}.selectedIndex-1} form.availP{$matching[m_product].productid}.value = optionsArray{$matching[m_product].productid}[{$colorIndex}][{$sizeIndex}]; {literal}}} {/literal}">, et voila ce que j'ai quand j'affiche la source :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <select name=Size41 onchange="if(form.color41.selectedIndex != 0) {if(form.size41.selectedIndex != 0){ .selectedIndex-1} .selectedIndex-1} form.availP41.value = optionsArray41[form.color{Array[m_product].productid][form.size{Array[m_product].productid]; }} ">![]()
Je comprend pas pourquoi il interprète pas mon code correctement...
Je ne suis pourtant pas en {literal}
Qu'est ce qui cloche ???
Merci mille fois pour votre aide !
Deb![]()
Partager