This is starting to freak my out by now. What's happening here?
See no result on http://www.mauricekappelhof.nl/work/TemplateTest/Backend/menu.php?page=1 See working result on http://jsfiddle.net/x7bgF/
Oh, i want to replace spaces with an underscore. So if you type a space in the 'Titel' field, the 'link' field suppose to show the same, but then with an underscore.
It's about this piece of jQuery
$(document).ready(function(){
$('#title').keyup(function(e){
var e = e || window.event;
$('#link').val($(this).val().replace(/\s/g, '_'));
});
});
You have an illegal character
$(document).ready(function(){
$('#title').keyup(function(e){
var e = e || window.event;
$('#link').val($(this).val().replace(/\s/g, '_'));
});? // <-- delete this and rewrite it
});
You can see it in notepad++
It's from copy and pasting from jsfiddle
I get:
SyntaxError: illegal character
});?
menu.php?page=1 (line 50, col 5)
on my log (note that the ? isnt displayed on my firebug, seems there is a hidden character or something on your php file).
when you change encoding on the source code you will get:
$(document).ready(function(){
$('#title').keyup(function(e){
var e = e || window.event;
$('#link').val($(this).val().replace(/\s/g, '_'));
});​
});
you may want to change your php file to UTF-8 if you are using that as encoding, firefox says you are using ISO-8859-1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With