PHP beginner |
|
Ik heb chrome en FF geinstalleerd om mijn website te testen.
Volgend stukje code werkt echter niet:
function userDialog() {
if($('userdialog').style.display == 'none') {
$('userdialog').style.display = 'block';
} else {
$('userdialog').style.display = 'none';
}
}
function userDialog() { if($('userdialog').style.display == 'none') { $('userdialog').style.display = 'block'; } else { $('userdialog').style.display = 'none'; } }
ook dit stukje code werkt niet:
function setTitle() {
var v_title = $('title').innerHTML;
$('contenttitle').innerHTML = '';
$('contenttitle').innerHTML = '<input type=\"text\" id=\"edittitle\" name=\"edittitle\" maxlength=\"55\" class=\"edittitle_input\" size=\"30\" value=\"' + v_title + '\" /> ' +
'<input type=\"button\" id=\"save_title\" name=\"save_title\" class=\"edittitle_submit\" value=\"Opslaan\" onclick=\"saveTitle();\" />';
}
function saveTitle() {
var title = $('edittitle').value;
$('contenttitle').innerHTML = '<span id=\"title\" onclick=\"setTitle();\">' + title + '</span>';
}
function setTitle() { var v_title = $('title').innerHTML; $('contenttitle').innerHTML = ''; $('contenttitle').innerHTML = '<input type=\"text\" id=\"edittitle\" name=\"edittitle\" maxlength=\"55\" class=\"edittitle_input\" size=\"30\" value=\"' + v_title + '\" /> ' + '<input type=\"button\" id=\"save_title\" name=\"save_title\" class=\"edittitle_submit\" value=\"Opslaan\" onclick=\"saveTitle();\" />'; } function saveTitle() { var title = $('edittitle').value; $('contenttitle').innerHTML = '<span id=\"title\" onclick=\"setTitle();\">' + title + '</span>'; }
Ok, eigenlijk werken al mijn codes niet, maar de rest v/d code is hetzelfde opgebouwd (ook allemaal met if/else en block/none-display).
Dit werkt vlot in IE maar niet in FF en chrome.
Iemand een oplossing?
|