I am using turkish character my site.(ISO 8859-9) The forms characters appears correctly.But alert popups character set not appears correctly.
It is a english form and I transtlate words like this to turkish;
Code:DEFINE( "ADSMANAGER_FORM_AD_TEXT", "Açıklama"); DEFINE( "ADSMANAGER_FORM_KINDOF", "Gönderi Şekli");
and the codes...
and problem pictureCode:<script type="text/javascript"><!--//--><![CDATA[//><!-- function submitbutton(mfrm) { var me = mfrm.elements; var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); var r_num = new RegExp("[^0-9\.,]", "i"); var r_email = new RegExp("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,3}$" ,"i"); var errorMSG = ''; var iserror=0; <?php if (function_exists("loadEditFormCheck")){ loadEditFormCheck($row); } ?> if (mfrm.username && (r.exec(mfrm.username.value) || mfrm.username.value.length < 3)) { errorMSG += mfrm.username.getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo addslashes(html_entity_decode(sprintf( ADSMANAGER_VALID_AZ09, ADSMANAGER_PROMPT_UNAME, 4 ),ENT_QUOTES)); ?>\n'; mfrm.username.style.background = "red"; iserror=1; } if (mfrm.password && r.exec(mfrm.password.value)) { errorMSG += mfrm.password.getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo addslashes(html_entity_decode(sprintf( ADSMANAGER_VALID_AZ09, ADSMANAGER_REGISTER_PASS, 6 ),ENT_QUOTES)); ?>\n'; mfrm.password.style.background = "red"; iserror=1; } if (mfrm.email && !r_email.exec(mfrm.email.value) && mfrm.email.getAttribute('mosReq')) { errorMSG += mfrm.email.getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo html_entity_decode(addslashes(ADSMANAGER_REGWARN_MAIL),ENT_QUOTES); ?>\n'; mfrm.email.style.background = "red"; iserror=1; } // loop through all input elements in form for (var i=0; i < me.length; i++) { if ((me[i].getAttribute('test') == 'number' ) && (r_num.exec(me[i].value))) { errorMSG += me[i].getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo html_entity_decode(addslashes(ADSMANAGER_REGWARN_NUMBER),ENT_QUOTES); ?>\n'; iserror=1; } // check if element is mandatory; here mosReq="1" if (me[i].getAttribute('mosReq') == 1) { if (me[i].type == 'radio' || me[i].type == 'checkbox') { var rOptions = me[me[i].getAttribute('name')]; var rChecked = 0; if(rOptions.length > 1) { for (var r=0; r < rOptions.length; r++) { if (rOptions[r].checked) { rChecked=1; } } } else { if (me[i].checked) { rChecked=1; } } if(rChecked==0) { // add up all error messages errorMSG += me[i].getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo html_entity_decode(addslashes(ADSMANAGER_REGWARN_ERROR),ENT_QUOTES); ?>\n'; // notify user by changing background color, in this case to red me[i].style.background = "red"; iserror=1; } } if (me[i].value == '') { // add up all error messages errorMSG += me[i].getAttribute('mosLabel').replace(' ',' ') + ' : <?php echo html_entity_decode(addslashes(ADSMANAGER_REGWARN_ERROR),ENT_QUOTES); ?>\n'; // notify user by changing background color, in this case to red me[i].style.background = "red"; iserror=1; } } } if(iserror==1) { alert(errorMSG); return false; } else { return true; } } //--><!]]></script>
![]()



Reply With Quote




Bookmarks