Nieuw lid |
|
Hallo allemaal.
Ik heb een vraagje over javascript.
Hoe stuur ik meerdere functies tegelijk aan als ik met onclick meer functies aan roep werkt alleen de eerste.
button
<input type="button" onclick="get_page('../modules/mod_comments/comment_edit.php?onderwerp=onderwerp&bericht=bericht&comment_id=comment_id&module_name=module_name','comment_edit');get_page('../modules/mod_comments/comment_edit_update_edits.php?onderwerp=onderwerp&bericht=bericht&comment_id=comment_id&module_name=module_name','comment_edit_update');"/>
<input type="button" onclick="get_page('../modules/mod_comments/comment_edit.php?onderwerp=onderwerp&bericht=bericht&comment_id=comment_id&module_name=module_name','comment_edit');get_page('../modules/mod_comments/comment_edit_update_edits.php?onderwerp=onderwerp&bericht=bericht&comment_id=comment_id&module_name=module_name','comment_edit_update');"/>
functies die hij aan roept.
function get_page(pagina, functie) {
if (xmlhttp) {
xmlhttp.open("GET", pagina, true);
eval('xmlhttp.onreadystatechange='+functie+';');
xmlhttp.send(null)
}
}
function comment_edit()
{
if (xmlhttp.readyState==4)
{
document.getElementById("edit_succes_window_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'block';
document.getElementById("edit_window_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'none';
document.getElementById("edit_succes_window_"+document.forms["edit_comment"].comment_id.value+"").innerHTML = xmlhttp.responseText;
}
}
function comment_edit_update_text()
{
if (xmlhttp.readyState==4)
{
document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_text").style.display = 'none';
document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_update_text").style.display = 'block';
document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_update_text").innerHTML = xmlhttp.responseText;
}
}
function comment_edit_update()
{
if (xmlhttp.readyState==4)
{
document.getElementById("comment_edits_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'none';
document.getElementById("comment_edits_update_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'block';
document.getElementById("comment_edits_update_"+document.forms["edit_comment"].comment_id.value+"").innerHTML = xmlhttp.responseText;
}
}
function get_page(pagina, functie) { if (xmlhttp) { xmlhttp.open("GET", pagina, true); eval('xmlhttp.onreadystatechange='+functie +';'); xmlhttp.send(null) } } function comment_edit() { if (xmlhttp.readyState==4) { document.getElementById("edit_succes_window_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'block'; document.getElementById("edit_window_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'none'; document.getElementById("edit_succes_window_"+document.forms["edit_comment"].comment_id.value+"").innerHTML = xmlhttp.responseText; } } function comment_edit_update_text() { if (xmlhttp.readyState==4) { document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_text").style.display = 'none'; document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_update_text").style.display = 'block'; document.getElementById("comment_id_"+document.forms["edit_comment"].comment_id.value+"_update_text").innerHTML = xmlhttp.responseText; } } function comment_edit_update() { if (xmlhttp.readyState==4) { document.getElementById("comment_edits_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'none'; document.getElementById("comment_edits_update_"+document.forms["edit_comment"].comment_id.value+"").style.display = 'block'; document.getElementById("comment_edits_update_"+document.forms["edit_comment"].comment_id.value+"").innerHTML = xmlhttp.responseText; } }
|