Found the error!!! :) I am really dumb... the 2nd div I wanted to sent the results to always had a class attribute but no id attribute and I misread class for id....
thx for your time Dormilich :)
User Profile
Collapse
-
well in fact the console feedbacks are right after using them in the function updatepage() like that:
Code:console.log("<b>sfArr["+sfArr[i]+"] AND rdArr["+rdArr[i]+"]"); //updatepage(sfArr[i],rdArr[i]);
and the function updatepage is just 1 line:
...Code:function updatepage(str,responsediv) { //window.scrollTo(0,0); document.getElementById(responsediv).innerHTMLLeave a comment:
-
ok tried by console log so firebug doesn´t give me the errors from before but shows everything fine in the firebug log, still the 2nd div isn´t adjusted somehow...Leave a comment:
-
I am obviously a super dummy concerning javascript :(
I now tried to make the script "better" by giving me the option to send answers from a script to several different divs. I tried doing so by introducing a pattern in responsediv so that each "|||" would be a split part and then by loop updating each div like below:
...Code:function xmlhttpPost(strURL,formname,responsemsg,responsediv) { var xmlHttpReqLeave a comment:
-
-
Having one ajax request resulting in output on 2 different divs
Hi there,
I´m stuck with a problem and hopefully you can help me:
I am using ajax for a login form and need to return the feedback of the php code used at 2 different divs. So I thought I would let the php script return one text block that I would then split by javascript and pass each of the 2 blocks to the respective div, but somehow I can´t make it work.
Here is the code I use (thx go to Simone Rodriguez):...
No activity results to display
Show More
Leave a comment: