diff --git a/application/helpers/frontend_helper.php b/application/helpers/frontend_helper.php index 5963dc094b4..1b14b0cfe02 100644 --- a/application/helpers/frontend_helper.php +++ b/application/helpers/frontend_helper.php @@ -258,7 +258,7 @@ function makeLanguageChangerSurvey($sSelectedLanguage) } $sHTMLCode=CHtml::dropDownList('lang', $sSelected,$aListLang,array('class'=>$sClass)); // We don't have to add this button if in previewmode - $sHTMLCode.= CHtml::htmlButton($clang->gT("Change the language"),array('type'=>'submit','id'=>"changelangbtn",'value'=>'changelang','name'=>'changelang','class'=>'changelang jshide hide')); + $sHTMLCode.= CHtml::htmlButton($clang->gT("Change the language"),array('type'=>'submit','id'=>"changelangbtn",'value'=>'changelang','name'=>'changelang','class'=>'changelang jshide')); return $sHTMLCode; } else diff --git a/scripts/survey_runtime.js b/scripts/survey_runtime.js index 3bb428b2c3a..00963da3d63 100644 --- a/scripts/survey_runtime.js +++ b/scripts/survey_runtime.js @@ -241,8 +241,11 @@ function showStartPopups(){ */ function activateLanguageChanger(){ $(document).on('change','select.languagechanger', function() { - if($(this).hasClass('getparam')){ - document.location.href=$(this).find('option:selected').val(); + if(!$(this).closest('form').length){// If there are no form : we can't use it, we need to create and submit. This break no-js compatibility in some page (token for example). + $('