<script type="text/javascript">
$(document).ready(function(){
$("#baslik").live("keyup", function() {
str = $(this).val();
str =replaceSpecialChars(str);
str=str.toLowerCase();
str =str.replace( /\s\s+/g, ' ' ).replace(/[^a-z0-9\s]/gi, '').replace(/[^\w]/ig, "-");
function replaceSpecialChars(str) {
var specialChars = [["ş", "s"], ["ğ", "g"], ["ü", "u"], ["ı", "i"],["_", "-"],
["ö", "o"], ["Ş", "S"], ["Ğ", "G"], ["Ç", "C"], ["ç", "c"],
["Ü", "U"], ["İ", "I"], ["Ö", "O"], ["ş", "s"]];
for (var i = 0; i < specialChars.length; i++) {
str = str.replace(eval("/" + specialChars[i][0] + "/ig"), specialChars[i][1]);
}
return str;
}
$("#sef").val(str);
});
});
</script>
<yazi><strong>Başlık</strong></yazi>
<br/>
<input id="baslik" type="text" value="" style="width: 699px; height: 40px;" class="input-text-panel" name="baslik"/>
<br/>
<yazi><strong>Sef link Yapısı</strong></yazi>
<br/>
<input id="sef" type="text" value="" style="width: 699px; height: 40px;" class="input-text-panel" name="sef"/>
Kolay gelsin.