Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery div not showing more them on user profile
    primarykey
    data
    text
    <p>I have been working on this code for a while and I am finally stumped and cannot figure out what the heck to do to get this issue fixed. </p> <p>I have a jquery code that works beautifully for the get profile, but when i need to return the values in a div, it only shows the first profile of the user, but if a user posts more then once on the blog, it will not show the profile information. I have tried to append more information for each profile div to be different, but its still not working. </p> <p>Here is the jQuery code for the GET user profile and return response.</p> <pre><code>function showUser(str) { var profileDiv = document.getElementById("profile_"+ str); if (str=="") { return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { profileDiv.innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getuser.php?q="+str,true); xmlhttp.send(); } </code></pre> <p>Also here is the PHP script that i am using to pass the information</p> <pre><code>"&lt;div id=\"info\" onmouseover=\"showUser(" .$blogrow['id_user'].")\"&gt;&lt;imgalign= \"left\" style=\"vertical-align:top;\" class=\"imgb\" height=\"41\" width=\"41\" src=\"profilepics/".$blogrow['pic']."\" /&gt;".$blogrow['author']." &lt;br&gt;".$blogrow['timestamp']."&lt;br&gt;&lt;/div&gt;&lt;br&gt;"; echo "&lt;/div&gt;"; </code></pre> <p>here is the div part as well that stores the information</p> <pre><code> echo "&lt;div id=\"txtHint\"&gt;&lt;div id=\"profile_".$blogrow['id_user']."\"&gt;&lt;/div&gt;&lt;/div&gt;"; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload