Hallo allemaal ik heb een vraagje.
Hoe krijg ik in function twee die door function een word aan geroepen de variable id.
Heeft iemand hier een id ?
En wat kan ik nog meer verbeteren aan deze code.
<?php
function comment_reply(id)
{
var id = document.forms["reply_comment_"+id+""].comment_id.value;
var module_name = document.forms["reply_comment_"+id+""].module_name.value;
var onderwerp = document.forms["reply_comment_"+id+""].onderwerp.value;
var bericht = document.forms["reply_comment_"+id+""].bericht.value;
var privat = document.forms["reply_comment_"+id+""].privat.value;
get_page('../modules/mod_profile/mod_profile_comment_reply.php?comment_id='+id+'&module_name='+module_name+'&onderwerp='+onderwerp+'&bericht='+bericht+'&privat='+privat+'', 'comment_reply_post');
}

function comment_reply_post()
{
if (xmlhttp.readyState==4)
{
var window1 = document.getElementById("reply_succes_window_"+id);
var window2 = document.getElementById("reply_window_"+id);
window1.style.display = 'block';
var elm = new Fx.Slide(window2).slideOut();
window1.innerHTML = xmlhttp.responseText;
}
}
?>
wat is nou je probleem?
Ook mee sturen in je functie aanroep.
Maar dat lukt me niet om dat de tweede functie via een get word aan geroepen.
function get_page(pagina, functie) {

if (xmlhttp) {

xmlhttp.open("GET", pagina, true);

eval('xmlhttp.onreadystatechange='+functie+';');

xmlhttp.readyState==4
// en bij het verderstappen naar hier gaat hij terug naar het begin van de pagina, en stopt dan volledig.

xmlhttp.send( null );

}
}

Reageren